Does anyone know if it's possible to have a parameter with multiple values in a SQL query? I am working on excel with a recordset and the parameter is in the cell B4, but I would like to give the user the option to add more than one value as a filter, using then a comma to separate the values. For example, looking for all suppliers in a four different cities. Does anyone have any ideas? Thank you so much.
VBA Code:
Dim originCity As String
originCity = Sheet1.Range("B4")
Dim SuppliersQ As String
SuppliersQ = "Select [ID], [Company], [Dept], [City], [Contact Person], [Phone] From [Suppliers$] " & _
"Where ('" & originCity & "' is null or '" & originCity & "' = '' or [City]='" & originCity & "')"