| Author |
please help SELECT
|
|
|
| Hi,
I can't figure out what is wrong with this
StrSQLDUP = "SELECT * FROM tblINrDUPTest WHERE tblINRDUPTest.plan=" &
txtRTOValues
Set rsDUP = New ADODB.Recordset
rsDUP.CursorType = adOpenKeyset
rsDUP.LockType = adLockOptimistic
rsDUP.Open StrSQLDUP, Cn , , , adCmdText
it worked fine until I added WHERE tblINRDUPTest.plan=" & txtRTOValues
it is returning this error
-2147217900 Syntax error (missing operator) in query expression.
Please help.
Thanks
Dib
| |
|
| got, it was missing =' & " ' " at the end
Thanks
Dib
"Dib" <NOTdibsSPAM@comNOSPAMcast.net> wrote in message
news:eEKKVzpGFHA.1176@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I can't figure out what is wrong with this
>
> StrSQLDUP = "SELECT * FROM tblINrDUPTest WHERE tblINRDUPTest.plan=" &
> txtRTOValues
>
> Set rsDUP = New ADODB.Recordset
>
> rsDUP.CursorType = adOpenKeyset
> rsDUP.LockType = adLockOptimistic
> rsDUP.Open StrSQLDUP, Cn , , , adCmdText
>
>
> it worked fine until I added WHERE tblINRDUPTest.plan=" & txtRTOValues
>
> it is returning this error
>
> -2147217900 Syntax error (missing operator) in query expression.
>
> Please help.
>
> Thanks
> Dib
>
>
| |
|
|
Glad we could help!<g>
"Dib" <NOTdibsSPAM@comNOSPAMcast.net> wrote in message
news:%23p1IA3pGFHA.2280@TK2MSFTNGP15.phx.gbl...
> got, it was missing =' & " ' " at the end
>
> Thanks
> Dib
>
> "Dib" <NOTdibsSPAM@comNOSPAMcast.net> wrote in message
> news:eEKKVzpGFHA.1176@TK2MSFTNGP12.phx.gbl...
>
>
| |
|
|
Most of the problems like that you can solve by using:
Debug.Print
instead of
StrSQLDUP =
to see what accually is in your SQL
:-)
--- Andy
>-----Original Message-----
>got, it was missing =' & " ' " at the end
>
>Thanks
>Dib
>
>"Dib" <NOTdibsSPAM@comNOSPAMcast.net> wrote in message
>news:eEKKVzpGFHA.1176@TK2MSFTNGP12.phx.gbl...
tblINRDUPTest.plan=" &[color=darkred]
tblINRDUPTest.plan=" & txtRTOValues[color=darkred]
expression.[color=darkred]
>
>
>.
>
| |
| Jeff Johnson [MVP: VB] 2005-02-24, 8:55 pm |
|
"Andy" <Andrzej7@hotmail.com> wrote in message
news:14b701c51aa1$99630f30$a601280a@phx.gbl...
> Most of the problems like that you can solve by using:
> Debug.Print
> instead of
> StrSQLDUP =
>
> to see what accually is in your SQL
Or Debug.Print StrSQLDUP
|
|
|
|