0

I have new error Error 3078: The Microsoft Access engine cannot find the table 'tbl_Parameters'.... I have not made any changes in this area of the cod. The same error occurs on a previous version of the application where I did not make any changes at all.

The table tbl_Parameters is local to the database. I have the same problem with another table that is in a linked database. The application is able access all the other 20+ tables without any errors.

Here is the code that fails.

strSQL = "SELECT TOP 1 PARAMETER_VALUE FROM tbl_Parameters WHERE PARAMETER_NAME _ ='DATE_LAST_PN_FILE';"  
Set db = DBEngine(0)(0)  
Set rs = db.OpenRecordset(strSQL, dbOpenForwardOnly)

I run the querySELECT TOP 1 PARAMETER_VALUE FROM tbl_Parameters WHERE PARAMETER_NAME = 'DATE_LAST_PN_FILE'; in the query editor and it runs fine.

Any help to solve this problem is appreciated.

Andre
  • 26,751
  • 7
  • 36
  • 80
Kaiser Otto
  • 77
  • 1
  • 10
  • 3
    `WHERE PARAMETER_NAME _ =` - remove that trailing underscore. – Andre Sep 10 '20 at 18:39
  • 1
    And try Compact&Repair + [Decompile](https://stackoverflow.com/a/3268188/3820271) – Andre Sep 10 '20 at 18:41
  • 2
    Are you sure `DBEngine(0)(0) ` is the database you want? Generally, we use `CurrentDb` to avoid trouble when multiple databases are open. – Erik A Sep 10 '20 at 19:03

0 Answers0