SQL coding not working in VBA

  • Thread starter vdha via AccessMonster.com
  • Start date
V

vdha via AccessMonster.com

I am trying to run this query in VB but I must have it written wrong but I
can't find where.
Could some body help me out

RS.Open "Select email from team where SONumber = '" & SONumber & "' and where
Financialaccess ='" & 1 & "'", CurrentProject.Connection, adOpenKeyset,
adLockOptimistic

Thanks
 
S

Sylvain Lafontaine

You have two Where statement; remove the second one (but keep the AND, of
course). Also, if Financialaccess is of type integer, then enclosing the
value 1 between single quotes might be wrong.
 
V

vdha via AccessMonster.com

Now, it is working.
Thanks for your quick help Sylvain


Sylvain said:
You have two Where statement; remove the second one (but keep the AND, of
course). Also, if Financialaccess is of type integer, then enclosing the
value 1 between single quotes might be wrong.
I am trying to run this query in VB but I must have it written wrong but I
can't find where.
[quoted text clipped - 6 lines]
 

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

Top