Sample Header Ad - 728x90

Why is Microsoft Access ADP file claiming my query is misspelled, with a 1 at the end of the query?

1 vote
0 answers
57 views
I have a Microsoft Access 2010 database file of type ADP (which can be compiled to an ADE file). This front-end application interacts with a Microsoft SQL Server in the backend. This application works fine in the current environment, but is having trouble in a new environment. In the new environment, the datasheet-type form we use loads correctly. The query in the form RecordSource is: > SELECT t1.columnone, t2.columntwo > FROM tableone t1 > INNER JOIN tabletwo t2 ON t2.columntwo = t1.columntwo > WHERE t1.condition = 'test' This will then fail, when trying to use the MS Access form to add a new record to existing records. The error is: > 'SELECT t1.columnone, t2.columntwo FROM tableone t1 INNER JOIN tabletwo t2 ON t2.columntwo = t1.columntwo WHERE t1.condition = 'test'**1**'@* You misspelled the object name. Check for missing > underscores (_) or other punctuation, and make sure you didn't enter > leading spaces. * You tried to open a linked table, but the file > containing Upon closer inspection, we can see that the number 1 has been erroneously added to the end of the query, but can confirm that the number 1 doesn't appear anywhere in the source code, so it is unclear why it is being added at runtime. We can confirm that the MS Access version is exactly same between versions and the SQL Server database is also the same. Based on research, we tried removing the dbo prefix from MS Access code, so that the code just shows tablename in queries (and no dbo. prefix). However, the issue persists. EDIT: Symptoms are the same as this article: https://stackoverflow.com/questions/13676293/access-2010-adp-appending-a-1-to-the-end-of-object-names , however the solution in that case is not relevant here (there is not multiple copies of MS Office/Access installed).
Asked by DRVr40Go (11 rep)
Aug 3, 2023, 01:32 AM
Last activity: Aug 3, 2023, 05:02 AM