Whenever the FE of my MDB loads it asks for a project to manage. Depending on the project, and it's location, it will delete the existing link and then connect to the needed BE link table.
However I have a situtaion where sometimes the linked table is not present to delete and thus the code fails.
Is there away to create a If Then Else statement to check to make sure the object exist?
However I have a situtaion where sometimes the linked table is not present to delete and thus the code fails.
Code:
DoCmd.DeleteObject acTable, "tblock"
DoCmd.TransferDatabase acLink, "Microsoft Access", strProjectPath.Value & "\DGNData.Mdb", acTable, "tblock", "tblock"
Is there away to create a If Then Else statement to check to make sure the object exist?
Code:
if exist <<linkTable>> then delete
Else
<<linkNewTable>