B
bigwillno2 via AccessMonster.com
I've tried to use many sources to get my list box problem fix, but somehow it
doesnt work. this is what i currently have:
Set frm = Form!Me
Set ctl = Me.sched
strSQL = "Select * from qrEditablePO"
'Assuming long [EmpID] is the bound field in lb
'enumerate selected items and
'concatenate to strSQL
intI = 0
For Each varItemS In ctl.ItemsSelected
intI = intI + 1
If intI = 1 Then
strSQL = strSQL & " WHERE [OrderNumber] = " & ctl.ItemData(varItemS)
Else
strSQL = strSQL & " OR [OrderNumber]= " & ctl.ItemData(varItemS)
End If
Next varItemS
i am very new to this and all i want to do is set a listbox that i have on a
form to be the criteria for some other query. can anyone help with this
situation.
doesnt work. this is what i currently have:
Set frm = Form!Me
Set ctl = Me.sched
strSQL = "Select * from qrEditablePO"
'Assuming long [EmpID] is the bound field in lb
'enumerate selected items and
'concatenate to strSQL
intI = 0
For Each varItemS In ctl.ItemsSelected
intI = intI + 1
If intI = 1 Then
strSQL = strSQL & " WHERE [OrderNumber] = " & ctl.ItemData(varItemS)
Else
strSQL = strSQL & " OR [OrderNumber]= " & ctl.ItemData(varItemS)
End If
Next varItemS
i am very new to this and all i want to do is set a listbox that i have on a
form to be the criteria for some other query. can anyone help with this
situation.