D
Don
I link to a "vendor" table.
Then I open a form and depending on a code field, the subform displays
data fronm the vendor table.
The subform shows the correct data.
In the form I select a different vendor table to link to.
The vba code deletes the link and establishes a link to the new table.
The displayed data is the same as the first linked table but when I
look at the table in my database the table is the new linked table.
DoCmd.DeleteObject acTable, "Employee"
DoCmd.TransferDatabase acLink, "Microsoft Access", VendorDBName &
".mdb", acTable, "Employee", "Employee", True
DoCmd.DeleteObject acTable, "Vendor"
DoCmd.TransferDatabase acLink, "Microsoft Access", VendorDBName &
".mdb", acTable, "Vendor", "Vendor", True
Does the "Form" keep all the links when it first opened and retains
them even if the vba code links to different table?
How can I release the old links while the form is still open?
Then I open a form and depending on a code field, the subform displays
data fronm the vendor table.
The subform shows the correct data.
In the form I select a different vendor table to link to.
The vba code deletes the link and establishes a link to the new table.
The displayed data is the same as the first linked table but when I
look at the table in my database the table is the new linked table.
DoCmd.DeleteObject acTable, "Employee"
DoCmd.TransferDatabase acLink, "Microsoft Access", VendorDBName &
".mdb", acTable, "Employee", "Employee", True
DoCmd.DeleteObject acTable, "Vendor"
DoCmd.TransferDatabase acLink, "Microsoft Access", VendorDBName &
".mdb", acTable, "Vendor", "Vendor", True
Does the "Form" keep all the links when it first opened and retains
them even if the vba code links to different table?
How can I release the old links while the form is still open?