Access 2003 FE
Sql Server BE
Hi
i Can loop a listbox to create a pass thru query using strCriteria as the parameter as thus
' Loop through the selected items in the list box and build a text string
For Each varItem In Me!lstActual.ItemsSelected
strCriteria = strCriteria & "," & Me!lstActual.ItemData(varItem) & ""
Next varItem
' Remove the leading comma from the string
strCriteria = Right(strCriteria, Len(strCriteria) - 1)
' Build the new SQL statement incorporating the string
strSQL = "SELECT DISTINCT TOP 100 PERCENT dbo.aaaaaaaaaa......
can i loop the values in a access table, to create the strCriteria that i can use in the pass thru query
Many Thanks
Sql Server BE
Hi
i Can loop a listbox to create a pass thru query using strCriteria as the parameter as thus
' Loop through the selected items in the list box and build a text string
For Each varItem In Me!lstActual.ItemsSelected
strCriteria = strCriteria & "," & Me!lstActual.ItemData(varItem) & ""
Next varItem
' Remove the leading comma from the string
strCriteria = Right(strCriteria, Len(strCriteria) - 1)
' Build the new SQL statement incorporating the string
strSQL = "SELECT DISTINCT TOP 100 PERCENT dbo.aaaaaaaaaa......
can i loop the values in a access table, to create the strCriteria that i can use in the pass thru query
Many Thanks