Hi,
i'm trying to build a parameter in VBA as a list of stings to pass it
to
MSAccess procedure such as
"select ...from ...WHERE Strategy in ([@Strategy_List]);"
(@Strategy_List would be a bunch of names such as : "ALL", "ALL_G",
etc)
but I'm having problem with quotation marks around each string in a
list.. if only one string is in the list then query works just find
but
additing second string to the list does not return anything from a
query.
extract from my code:
Set adoCmd = New ADODB.Command
With adoCmd
Set .ActiveConnection = cn
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""" & ""
.Parameters.Append ParamStrategy
end with
Set rs = New ADODB.Recordset
Set rs = adoCmd.Execute
would appreciate any help on it
cheers
D.