Hi
Can anyone help?
I am trying to identify selective records using vba and sql and am unable to select the correct records using my code. I have a table containing the records fro selection having the fields JobNo and Code which in all records the criteria for selection.
The code reads
input #1, contract,Porderno,depotname,Pnims
sql="select * from Jobs where jobno = '" & Porderno & "' and code = '" & Pnims & "'"
On running the code my query never finds the records based on the 2 fields, it only appears to work using the first field.
All fields in both the table being queried and the parameters being fed contain the correct data.
Any help would be appreciated.
Regards
Ian Clegg
Can anyone help?
I am trying to identify selective records using vba and sql and am unable to select the correct records using my code. I have a table containing the records fro selection having the fields JobNo and Code which in all records the criteria for selection.
The code reads
input #1, contract,Porderno,depotname,Pnims
sql="select * from Jobs where jobno = '" & Porderno & "' and code = '" & Pnims & "'"
On running the code my query never finds the records based on the 2 fields, it only appears to work using the first field.
All fields in both the table being queried and the parameters being fed contain the correct data.
Any help would be appreciated.
Regards
Ian Clegg