SQL code wrong-Help.

  • Thread starter Thread starter josh
  • Start date Start date
J

josh

TA,

Try this:
strSQL = "SELECT * FROM cumemployee " _
& " WHERE batch = '" _
& Me!Combo5.Value & "';"

You were missing the semi-colon which is required at the
end of every SQL statement. Try adding this line to help
debug a SQL statement:

debug.print strSQL

If you can't see what's wrong by looking at the SQL, then
copy it into a new query and let access try to fix it.

HTH,
Josh
 
josh said:
TA,

Try this:
strSQL = "SELECT * FROM cumemployee " _
& " WHERE batch = '" _
& Me!Combo5.Value & "';"

You were missing the semi-colon which is required at the
end of every SQL statement (snip)


Not true - either in the SQL window of the query designer, or when entering
SQL through code.

TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top