P
Panos
I have a listbox which dynamically shows records when i enter criteria in a
texbox
using the textbox's on change event
After that i want like to be able to filter a report based on the records
that are currently displayed in the listbox without having to select any.
Just the ones i can see at the moment. I allready have the code which gives
me the ones that are selected and i need to modify it in case i dont select
anything
Code below------
Private Sub Command22_Click()
Dim strWhere As String, varitem As Variant
For Each varitem In Me.List0.ItemsSelected
strWhere = strWhere & Me.List0.Column(0, varitem) & ","
Next varitem
strWhere = "[ID] IN (" & strWhere & ")"
DoCmd.OpenReport "ReportList", acViewPreview, , strWhere
end sub
texbox
using the textbox's on change event
After that i want like to be able to filter a report based on the records
that are currently displayed in the listbox without having to select any.
Just the ones i can see at the moment. I allready have the code which gives
me the ones that are selected and i need to modify it in case i dont select
anything
Code below------
Private Sub Command22_Click()
Dim strWhere As String, varitem As Variant
For Each varitem In Me.List0.ItemsSelected
strWhere = strWhere & Me.List0.Column(0, varitem) & ","
Next varitem
strWhere = "[ID] IN (" & strWhere & ")"
DoCmd.OpenReport "ReportList", acViewPreview, , strWhere
end sub