I am attempting to perform a Dlookup to populate an unbound control with the following command:
Me.txtad_Ship.Value = DLookup("[ad_Ship]", "[Tanks]", "[Job_ID] = " & Me.Job_ID)
For some of the records, I get an error message of "Syntax error (missing operator) in query experssion '[Job_ID] ='."
The crazy part that I don't get is that this command works for most of the records in the same form and the field [Job_ID] contains the correct ID#. I've also checked the table and it contains the appropriate value. I've also tried fetching the field with a sql Select statement with the same results.
I just don't get it. Why does it work on most records but not a select few? Any help would be greatly appreciated!!
Me.txtad_Ship.Value = DLookup("[ad_Ship]", "[Tanks]", "[Job_ID] = " & Me.Job_ID)
For some of the records, I get an error message of "Syntax error (missing operator) in query experssion '[Job_ID] ='."
The crazy part that I don't get is that this command works for most of the records in the same form and the field [Job_ID] contains the correct ID#. I've also checked the table and it contains the appropriate value. I've also tried fetching the field with a sql Select statement with the same results.
I just don't get it. Why does it work on most records but not a select few? Any help would be greatly appreciated!!