Hi all,
I'm looking to setup a file import process which also appends a variable number to one of the fields. The import itself is already setup - it's a simple .csv file which is imported via DoCmd.TransferText.
There's a button in a form labeled "Import" which calls the import process. Thus, upon clicking the "Import" button,a function is called which imports the specified file into tblApp_Import. The file only contains 2 columns: one called "USERNAME", another called "TICKET". This table contains 4 total fields.
-ID: AutoNumber (Primary Key)
-USERNAME: Text
-TICKET: Text
-APP_ID: Integer
So obviously the USERNAME and TICKET columns from the file are imported into the corresponding fields in this table. The APP_ID field is NOT on the file being imported.
I need to populate that field with a numerical value corresponding with whichever Application is selected in the form (this is a basic List Box with a handful of choices - each of which has a specific numerical value).
This number would need to be populated in the APP_ID field for every record that just imported. Thus if the table contains 30 records of USERNAME and TICKET, the APP_ID field would need to be populated with the number 12 for each of those 30 records.
I'm thinking of just creating an APPEND query which passes that number from the form into the APP_ID field.. So this query would need to be executed separately, after the initial import
Is there a more logical way to do this?