KP_SoCal
Registered User.
- Local time
- Today, 08:52
- Joined
- Dec 4, 2009
- Messages
- 39
I run the following code to import a table from another database into my current database.
If CurrentTable2009 already exists in my current database, I do not the sub routine to run. So essentially I'm saying:
I'm just not sure how to translate this logic into the correct code for an If/Else condition. Thanks for any suggestions!
Code:
DoCmd.TransferDatabase acImport, "Microsoft Access", _
"C:\MyDocs\AnotherDatabase.mdb", acTable, "AnotherTable2009", “CurrentTable2009”
Code:
If CurrentTable2009 Does Not Exist Then
DoCmd.TransferDatabase acImport, "Microsoft Access", _
"C:\MyDocs\AnotherDatabase.mdb", acTable, "AnotherTable2009", “CurrentTable2009”
Else
Exit Sub
EndIf