Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Careful if the backend database is DB2 and the data field is numeric those
single quotes are going to cause a type mismatch error. Mark "vehement" wrote: 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 thinks 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.htm -- vehement ------------------------------------------------------------------------ vehement's Profile: http://www.excelforum.com/member.php...o&userid=15417 View this thread: http://www.excelforum.com/showthread...hreadid=270221 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ODBC Passwords saving in Excel queries | Excel Discussion (Misc queries) | |||
Parameters In External ODBC Data Queries - "is one of" | Excel Discussion (Misc queries) | |||
Controlling ODBC queries with VB variables | Excel Programming | |||
Controlling ODBC queries with VB variables | Excel Programming | |||
Column aliasing fails in ODBC queries w/multiple tables | Excel Programming |