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 CopytblHerdInfo rmation()
On Error GoTo CopytblHerdInfo rmation_Err
DoCmd.DeleteObj ect acTable, "tblHerdInforma tionPY"
DoCmd.Rename "tblHerdInforma tionPY", acTable, "tblHerdInforma tion"
DoCmd.CopyObjec t , "tblHerdInforma tion", acTable, "tblHerdInforma tionPY"
DoCmd.SetWarnin gs False
DoCmd.RunSQL "UPDATE tblHerdInformat ionPY SET
tblHerdInformat ionPY.NumberOfF reeVisits = 0, tblHerdInformat ionPY.New =
False;"
DoCmd.SetWarnin gs True
CopytblHerdInfo rmation_Exit:
Exit Sub
CopytblHerdInfo rmation_Err:
If Err.Number = 3011 Then
Resume Next
Else
MsgBox Err.Number & ", " & Err.Description
Resume CopytblHerdInfo rmation_Exit
End If
End Sub
--------------------------------------
Thanks,
Brad
*** Sent via Developersdex
http://www.developersdex.com ***