View Full Version : Add data to a field when running append query


TSV
04-16-2002, 09:44 PM
I'm pretty new to access and I'm REALLY confused!

I'm importing a list of sales leads into Access from Excel. I need to run several queries on this data to disburse the leads to certain salesmen given certain criteria. I want to do an append query for each salesman to add the leads that I am giving to that salesman to his own table. When running this append query I would like to designate each record that gets appended with a date stamp and the salesmans ID. How can I do this?

Any and all help is greatly appreciated!

Pat Hartman
04-17-2002, 06:08 PM
You should NOT have a separate table for each salesperson. You are just creating a maintenance nightmare for yourself and your successors. You can always determine which sales person a lead belongs to by filtering on SalesId.

To add "calculated" fields to a query is easy enough. Just add two more columns to the append query:
SalesId:"SomeValue"
AssignedDate: Date()

NOTE: Don't put a space between the colon and Date(). I did it because the forum kept changing the character string to a happy face. Which is cute but not accurate http://www.access-programmers.co.uk/ubb/smile.gif <-- I did that one.

[This message has been edited by Pat Hartman (edited 04-17-2002).]