View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
vehement[_3_] vehement[_3_] is offline
external usenet poster
 
Posts: 1
Default Controlling ODBC queries with VB variables


The correct way to pass a variable is like this:

"WHERE (`ORDER PROJECTIONS`.LB4= ' " & Var & " ')"

Notice the double qoutes nested within the single qoutes. VB think
your ending the query string otherwise. Thanks again Eric.

This is a good site for writing queries in Office VBA
http://www.fontstuff.com/access/acctut15.ht

--
vehemen
-----------------------------------------------------------------------
vehement's Profile: http://www.excelforum.com/member.php...fo&userid=1541
View this thread: http://www.excelforum.com/showthread.php?threadid=27022