Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
i'm trying to build a parameter in VBA as a list stings to pass it to MSAccess procedure such as "select ...from ...WHERE Strategy in ([@Strategy_List]);" but I'm having problem with quotation marks around each string in a list.. if only one name is in the list then query works just find but additing second string to the list breaks it... Set ParamStrategy = .CreateParameter("@Strategy_List", adVariant, adParamInput) 'this one will work as only one string in the list ParamStrategy.Value = "ALL_STRT" param with two strings fails 'ParamStrategy.Value = "" & """ALL_G""" & "," & """ALL_O""" & "" would appreciate any help on it cheers D. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See this:
http://www.dbforums.com/showthread.p...65#post4447965 -- Regards, Tom Ogilvy wrote in message ups.com... Hi, i'm trying to build a parameter in VBA as a list stings to pass it to MSAccess procedure such as "select ...from ...WHERE Strategy in ([@Strategy_List]);" but I'm having problem with quotation marks around each string in a list.. if only one name is in the list then query works just find but additing second string to the list breaks it... Set ParamStrategy = .CreateParameter("@Strategy_List", adVariant, adParamInput) 'this one will work as only one string in the list ParamStrategy.Value = "ALL_STRT" param with two strings fails 'ParamStrategy.Value = "" & """ALL_G""" & "," & """ALL_O""" & "" would appreciate any help on it cheers D. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom, thank U for the response but the problem mentioned in the posting
(through the link U provided) is different from mine: i'm sending one parameter which contains a list of strings (not a list of parameters) but in the example from your link is an attempt to append parameter to another parameter ... well, at least as I'm interpreting my issue.. cheers D. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sounds to me like you either need a single string that has a list of comma
separated words in it "red,blue,green" or you need an array (if the parameter will accept an array). -- Regards Tom Ogilvy wrote in message oups.com... Tom, thank U for the response but the problem mentioned in the posting (through the link U provided) is different from mine: i'm sending one parameter which contains a list of strings (not a list of parameters) but in the example from your link is an attempt to append parameter to another parameter ... well, at least as I'm interpreting my issue.. cheers D. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to build a formula from a string of text | Excel Worksheet Functions | |||
open a spreadsheet with param | Excel Discussion (Misc queries) | |||
Haeder/Footer param | Excel Programming | |||
CorruptLoad param of Workbooks.Open | Excel Programming | |||
How to build build a macro that automatically imports | Excel Programming |