Add value to field during Excel import

  • Thread starter Thread starter yuhui
  • Start date Start date
Y

yuhui

I have a very simple form with just one button. When the user clicks it,
it asks the user to locate an Excel file, then it imports that file's
contents into a table. (The contents consist of serial numbers.)

Now I want to add a field to the form so that when the import is
occurring, it will also add in the field's value to the record.

i.e.
Table design: serial number, country
Form: button to import "serial numbers", text field to enter "country"
Import result: all of the records corresponding to the import will have
their "country" fields filled in by whatever is entered in the form's
text field.

The "country" value isn't in the Excel file because I get the Excel
files from several places, so each import will have its own country
which I enter manually.

How do I go about doing this "live" update? Thanks!
 
Yuhui,

I would recommend doing this in two steps. Import your data from
Excel into a table with just the Serial Number field, and then use an
Append Query to get the imported data, plus the Country, into the
table which will be its final resting place.

- Steve Schapel, Microsoft Access MVP
 
Back
Top