Multiple backend tables with the same name

MrTibbs

Registered User.
Local time
Today, 00:23
Joined
Oct 10, 2001
Messages
101
Access '97
I've got different back-end databases, all with a table e.g. tblProcess in them.
How can I link to all of them simultaneously from VBA controlling their aliases?
Access allows me to link, appending 1,2,3 suffixes depending on the link order from the Tables view: How do I mimic this behaviour in code?
Alternative: Is there a macro recorder in Access '97 which can follow my manual links creating a template for my code?
 
Use the code:

DoCmd.TransferDatabase acLink, "Microsoft Access", strDBPath, acTable, "TableName", "Alias"

Where strDBPath is the full path and name of the database you are linking to (i.e. "C:\Projects\Database1.mdb")

and

TableName = the name of the table in the target database that you want to link to (in your case "tblProcess")

and

Alias is the name of the table as you want it to appear in your current database.
 

Users who are viewing this thread

Back
Top Bottom