lespritdelescalier
Registered User.
- Local time
- Today, 03:57
- Joined
- Mar 16, 2015
- Messages
- 50
I am using Access 2010, and have a linked table using an ODBC Machine Data Source. I can open the linked table in the database view, and view all of the data. I can create a new form, and connect to the table, and read and display the data. However, when I try to connect to the table from an existing form it gives me the following error:
Run-time error '3184':
Could not execute query; could not find linked table.
I am using the same code to connect to the table on both forms. Here is code that I used on the new form which successfully connects to the table. I also copied this code to the old form, and it throws the error on the last included line:
Some other relevant info: This is currently running on a test server with a test db. I have a copy running in production and there are no errors. However, we are migrating the database to a new server which is supposed to mirror the setup of the test one, so I can't just ignore it because it works in prod.
Thanks!
Run-time error '3184':
Could not execute query; could not find linked table.
I am using the same code to connect to the table on both forms. Here is code that I used on the new form which successfully connects to the table. I also copied this code to the old form, and it throws the error on the last included line:
Code:
Dim db As Database
Set db = CurrentDb
Dim rs As Recordset
Set rs = db.OpenRecordset("select PART_PARENT from LINKED_TABLE where PART_PARENT = 'A'")
Some other relevant info: This is currently running on a test server with a test db. I have a copy running in production and there are no errors. However, we are migrating the database to a new server which is supposed to mirror the setup of the test one, so I can't just ignore it because it works in prod.
Thanks!