multiselect

  • Thread starter Thread starter Miskacee
  • Start date Start date
M

Miskacee

How can I reference a list from a listbox into the header of a report. For
example if user selects under Region list box, AP, ESA, then how can I get
these 2 regions to show up on a header report?

What is happening, is all of the records are behind the header, not just the
2 items selected from the list box on another form.
 
How can I reference a list from a listbox into the header of a report.  For
example if user selects under Region list box, AP, ESA, then how can I get
these 2 regions to show up on a header report?

What is happening, is all of the records are behind the header, not just the
2 items selected from the list box on another form.

loop through the itemsselected collection, write them to a string, and
shove them into a textbox on the report in the Open event.
 
have already done all of the below except "shoove them in a text box' - there
is where i'm stuck.
 
have already done all of the below except "shoove them in a text box' - there
is where i'm stuck.

Private Sub cmdListSelected_Click()
Dim strList As String
Dim varItem As Variant

For Each varItem In Me.lbxQueries.ItemsSelected
strList = strList & ", " & Me.lbxQueries.ItemData(varItem)
Next varItem

' --- clean up the string (remove extra comma and space)
If Len(strList) > 2 Then
strList = Right(strList, Len(strList) - 2)
End If

Me.txtQueryList = strList
End Sub
 
I already had all of the information except I have one question. Where are
you getting: txtQueryList?

I know i'm on the right track but I had the following:

strList = "([region] " & strRegion & ")" & _
" or ([location] " & strlocation & ")"
With Reports![rpt_analysis]
.Filter = strList
.FilterOn = True
I keep getting syntax error - missing operator.

Any suggestions?

Thank you so much!
 
Back
Top