Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synax error

Status
Not open for further replies.

ifeyinwa

Programmer
Mar 26, 2003
112
US
hey guys I am getting an error at the 'AUDIT' what am I doing wrong. billno is alpanumeric


SQLQuery = "SELECT * FROM tblopgaCOm2 WHERE billNo = '"&billNo&"'" and area like 'AUDIT'
 
your quotes are in the wrong place. try this instead:
Code:
SQLQuery = "SELECT * FROM tblopgaCOm2 WHERE billNo = '"&billNo&"' and area like 'AUDIT'"
Also, instead of using *, just list the fieldnames that you actually require in your recordset - it would be much more efficient this way.
Code:
SELECT fieldname1, fieldname2, fieldname 3 FROM tblopgaCOm2......

Tony
_______________________________________________________________
 
al so you might want to try
Code:
.. area like '%AUDIT%'"

not sure how you are looking for it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top