![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Here's some code that someone wrote for me. It's supposed to copy tblRights from an external mdb into my main database. tblRights already exists there so when it's copied in it becomes tblRights1. tblRights is cleared out using the DELETE line and then the contents of tblRights1 is appended into tblRights. Finally tblRights1 is deleted. However when i check I find that tblRights is empty; the code hasn't copied the records over - anyone know why it's not working? tblRights does have relationships but I'm pretty sure this shouldn't affect it. -----that code snippet---- 'selectedBU contains the path. DoCmd.TransferDatabase acLink, "Microsoft access", selectedBU, acTable, "tblRights", "tblRights" DoCmd.RunSQL "DELETE tblRights.* FROM tblRights;" DoCmd.RunSQL "INSERT INTO tblRights SELECT tblRights1.* FROM tblRights1;" DoCmd.DeleteObject acTable, "tblRights1" |
![]() |
| Thread Tools | |
| Display Modes | |
| |