D
Deleted member 125916
Guest
Hi all,
I'm working with several different source datasets. Mostly this are TXT files.
When I import the data in a new table with a specification, I want to validate if the dataset is the correct dataset be validating the headers in the source data.
I have created a table with the headers, that consists of 92 columns. Below 3 example columns of the header data:
tbl_Tickets_Headers
Field1 Field2 Field3
StagnationId TicketTypeId SequenceNr
Now I want to check during the import of the imported data has a line in it that is equal to the data in the table headers. If not, the import stops and informs the user that the data set is not correct. This to prevent that incorrect data will be inserted into the databse.
Anyone has a tip of how this can be done by VBA or maybe just with queries?
Some extra information:
I'm working with several different source datasets. Mostly this are TXT files.
When I import the data in a new table with a specification, I want to validate if the dataset is the correct dataset be validating the headers in the source data.
I have created a table with the headers, that consists of 92 columns. Below 3 example columns of the header data:
tbl_Tickets_Headers
Field1 Field2 Field3
StagnationId TicketTypeId SequenceNr
Now I want to check during the import of the imported data has a line in it that is equal to the data in the table headers. If not, the import stops and informs the user that the data set is not correct. This to prevent that incorrect data will be inserted into the databse.
Anyone has a tip of how this can be done by VBA or maybe just with queries?
Some extra information:
- The data is import into the database via VBA DoCmd.TransferText into a new created table, using an inport specification.
- If the data is okay, it will be appeneded to an existing table that is being used to process the data furter.
- After that the import table is being deleted.
Last edited by a moderator: