Hello experts,
I am trying to run a query which selects all the records in which the first 5 characters of a field called "Status" are "Quote".
I've included the following phrase in my select query: Left([Status],5)="Quote" and am getting the subject error message.
The interesting thing is that when I run exactly the same mdb file on a different machine no errors are created and the machine runs as expected.
For example, lets take two of my machines which are on the same network.
Both are Dell 3000 running windows XP Pro SP3.
Both are running MS Access 2000 (9.0.3821 SR-1)
Both are running exactly the same .mdb file
The first machine, however, gives me the subject error.
The second machine works as expected.
Can anyone help?
Complete Query:
strSQLtext = "SELECT Quotes.SearchNumber, Quotes.PartNumber1, Quotes.WantQuantity1, Quotes.StatusDate, ComponentSlave.SnapShotDate, Quotes.Status "
strSQLtext = strSQLtext & "FROM Quotes LEFT JOIN ComponentSlave ON Quotes.SearchNumber = ComponentSlave.SearchNumber "
strSQLtext = strSQLtext & "where (((ComponentSlave.SnapShotDate) < #" & dteLastSnapShotDate & "# Or (ComponentSlave.SnapShotDate) Is Null) And ((Quotes.StatusDate) >= #" & dteRequestDate & "#) And ( (Left([Status], 5)) = 'Quote') ) "
strSQLtext = strSQLtext & "ORDER BY Quotes.StatusDate DESC ;"
Although it should not be necessary, you might also want to modify the reference to [Status] in your WHERE clause to Quotes.[Status]