Renaming linked tables

DNewman

Registered User.
Local time
Today, 12:06
Joined
Oct 12, 2012
Messages
60
I have a split database.(Access 2010)
Three of the linked tables are Appointments, Appointments_OLD, Appointments_NEW
I want to use vba to rename Appointments as Appointments_OLD (replacing the current one) and to rename Appointments_NEW as Appointments (replacing the current one)
I have used:

'replace Appointments_OLD by Appointments, replace Appointments by Appointments_NEW
DoCmd.Rename "Appointments_OLD", acTable, "Appointments"
DoCmd.CopyObject , "Appointments", acTable, , "Appointments_NEW"

Unfortunately this just made Appointments and Appointments_NEW clones of one another - changes in one automatically occur in the other.

What I actually want to do is to swap the names round in the backend database while maintaining the right links to the frontend.
Is this possible using vba in the frontend?
Any suggestions would be gratefully received.
 
The whole notion of renaming the tables is flawed.

Put all the data into one table and add a boolean field to indicate Old or New. Change the front end tables to queries that select old or new as required.
 

Users who are viewing this thread

Back
Top Bottom