Thanks for taking the time to read my question.
I have a split DB and I want to be able to delete the old table, copy an
existing table that is in the back end, rename it, and then make sure
all my links are still in tact. Right now I seem to be just doing this
to my table links in my front end.
Is this possible?
Here is my code:
------------------------------
Sub CopytblHerdInformation()
On Error GoTo CopytblHerdInformation_Err
DoCmd.DeleteObject acTable, "tblHerdInformationPY"
DoCmd.Rename "tblHerdInformationPY", acTable, "tblHerdInformation"
DoCmd.CopyObject , "tblHerdInformation", acTable, "tblHerdInformationPY"
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tblHerdInformationPY SET
tblHerdInformationPY.NumberOfFreeVisits = 0, tblHerdInformationPY.New =
False;"
DoCmd.SetWarnings True
CopytblHerdInformation_Exit:
Exit Sub
CopytblHerdInformation_Err:
If Err.Number = 3011 Then
Resume Next
Else
MsgBox Err.Number & ", " & Err.Description
Resume CopytblHerdInformation_Exit
End If
End Sub
--------------------------------------
Thanks,
Brad
*** Sent via Developersdex
http://www.developersdex.com ***