Hi,
I am using the following code to import data from an existing database into a new database as new releases have been distributed.
'Add new tables to Back End
DoCmd.RunSQL "DROP TABLE tblMain;"
DoCmd.TransferDatabase acImport, "Microsoft Access", dbPath, acTable, "tblMain", "tblMain"
DoCmd.RunSQL "DROP TABLE tblDaily;"
DoCmd.TransferDatabase acImport, "Microsoft Access", dbPath, acTable, "tblDaily", "tblDaily"
Up unitl now it has work perfectly every time.
Here is my problem,
On a new release I have added two new columns in the tblDaily. Everything else is the same execpt the two new columns, "Airfare" & "Car Rental" when run the Module that has the above code in it, it runs but the "DROP TABLE" drops my new table and imports the old one thus eliminating the "Airfare and Car Rental" fields.
Can anyone please assist me in getting the SQL right, so when I do the import it adds the old data to the new database keeping the two fields I mentioned?
Thanks in advance.
Fen How
I am using the following code to import data from an existing database into a new database as new releases have been distributed.
'Add new tables to Back End
DoCmd.RunSQL "DROP TABLE tblMain;"
DoCmd.TransferDatabase acImport, "Microsoft Access", dbPath, acTable, "tblMain", "tblMain"
DoCmd.RunSQL "DROP TABLE tblDaily;"
DoCmd.TransferDatabase acImport, "Microsoft Access", dbPath, acTable, "tblDaily", "tblDaily"
Up unitl now it has work perfectly every time.
Here is my problem,
On a new release I have added two new columns in the tblDaily. Everything else is the same execpt the two new columns, "Airfare" & "Car Rental" when run the Module that has the above code in it, it runs but the "DROP TABLE" drops my new table and imports the old one thus eliminating the "Airfare and Car Rental" fields.
Can anyone please assist me in getting the SQL right, so when I do the import it adds the old data to the new database keeping the two fields I mentioned?
Thanks in advance.
Fen How