
I am getting an error Please help if you can
Rick,
it looks like you have an unbalanced set of quotes -- as a minimum, there should
be an even number of them on every line. Have a closer look at the line
containing the where clause.
Consider the following:
strSql = "select * from comm " & _
"where Auto = " & DBGrid1 & _
"order by ordern"
If Auto is of type string/char, then you may want to consider something like
this:
strSql = "select * from comm where Auto = '" & DBGrid1 & "' order by ordern"
Note the single quotes around the value of DBGrid1. This is a good case for
using the Command object with a Parameter for the where value..
strSql = "select * from comm where Auto=? order by ordern"
best regards,
roy fine
Quote:
> I am getting "Expected end of statement" error where is my syntax wrong?
> strSql = "select * " & _
> "from comm " & _
> "where Auto = " & DBGrid1 & " & _
> "order by ordern"
> THANKS!!!!