Im trying to move my database to Ms SQL Server 2008. I did that upsizing and checked the tables and everything seems to be fine.
However, when I run a piece of my code I get the error from the title.
This is the line where is appears:
Table1 field is a true/false (Yes/No) field, IdTable1 is autonumber and SomeOtherVariable contains a number.
In the old application (.accdb where I keep forms and queries) where the linked database is .mdb the code runs fine.
I found out that this might be causing the problem "WHERE Table1", I tried "WHERE Table1 = True", "WHERE Table1 = 1" also "WHERE Table1 <> False" but it didnt help. When I remove that part it works and the code is:
However, I need that ture fals parametar, I have no idea what could be the problem.
However, when I run a piece of my code I get the error from the title.
This is the line where is appears:
Code:
Set NewVariable = MyDb.OpenRecordset("SELECT * FROM Table1 WHERE Table1 AND IdTable1 >" & SomeOtherVariable, dbOpenDynaset, dbSeeChanges)
In the old application (.accdb where I keep forms and queries) where the linked database is .mdb the code runs fine.
I found out that this might be causing the problem "WHERE Table1", I tried "WHERE Table1 = True", "WHERE Table1 = 1" also "WHERE Table1 <> False" but it didnt help. When I remove that part it works and the code is:
Code:
Set NewVariable = MyDb.OpenRecordset("SELECT * FROM Table1 WHERE IdTable1 >" & SomeOtherVariable, dbOpenDynaset, dbSeeChanges)