Default Value question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I am importing data to a single table from multiple text files using a macro
and it is importing beautifully.
One piece of information is a required field but is not part of the file I
am importing.

I have a form with a combo box for the various selections that can go into
that field.

Can I have the value set to "A" for the first list I import and "B" for the
second list.

David
 
What I would do is this:

1) Import the first text file to an empty temporary table.

2) Run an append query to copy the data from the first table to the
permanent table. Include a calculated field in this query that provides the
value of "A" for all records.

3) Delete all records from the temporary table.

4) Import the second text file to the empty temporary table.

5) Run an append query to copy the data from the first table to the
permanent table. Include a calculated field in this query that provides the
value of "B" for all records.

6) Delete all records from the temporary table.
 
How do I do step 2?
I haven't used append queries before and I just don't know how to include a
calculated field.
 
I got it. Thanks a Bunch!

David

Ken Snell (MVP) said:
What I would do is this:

1) Import the first text file to an empty temporary table.

2) Run an append query to copy the data from the first table to the
permanent table. Include a calculated field in this query that provides the
value of "A" for all records.

3) Delete all records from the temporary table.

4) Import the second text file to the empty temporary table.

5) Run an append query to copy the data from the first table to the
permanent table. Include a calculated field in this query that provides the
value of "B" for all records.

6) Delete all records from the temporary table.
 
Back
Top