D
Don
I've written the following code:
DoCmd.DeleteObject acTable, "tblDATA"
DoCmd.TransferDatabase acImport, "Microsoft Access", Me.PATH_STATEMENT &
"" & Me.FILE_NAME, acTable, "tblDATA", "tblDATA"
This code will delete the table "tblDATA", then go to another database with
an identical table and transfer that "tblDATA" to the original database.
Question: How can I stop this code if the database at the end of the path
statement is not there? The first line of my code deletes the original
"tblDATA" and I'll be left with no table if the second database is not where
it should be. Then, if I do put it where it needs to be, I won't be able to
get by the first line of code when I re-run the code.
I need the code to verify the second database's location and validity before
deleting my table. I'd appreciate anyone's help on this matter. Thanks.
DoCmd.DeleteObject acTable, "tblDATA"
DoCmd.TransferDatabase acImport, "Microsoft Access", Me.PATH_STATEMENT &
"" & Me.FILE_NAME, acTable, "tblDATA", "tblDATA"
This code will delete the table "tblDATA", then go to another database with
an identical table and transfer that "tblDATA" to the original database.
Question: How can I stop this code if the database at the end of the path
statement is not there? The first line of my code deletes the original
"tblDATA" and I'll be left with no table if the second database is not where
it should be. Then, if I do put it where it needs to be, I won't be able to
get by the first line of code when I re-run the code.
I need the code to verify the second database's location and validity before
deleting my table. I'd appreciate anyone's help on this matter. Thanks.