Hello all! I hope everyone had a very Merry Christmas!
I have a report that gets fed Employee data from the following code:
strDocName = "Graph - Lease Assignment"
Set First = Me!lstLA_PR
If First.MultiSelect > 0 Then
If First.ItemsSelected.Count > 0 Then
For Each varItem In First.ItemsSelected
strOut = strOut & "," & Chr(34) & First.ItemData(varItem) & Chr(34)
strOut = Mid(strOut, 2)
strOut = "In(" & strOut & ")"
MsgBox "Please make a selection!"
strWhere = "(" & "([Employee])" & strOut & ")"
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
Odd thing is, if you select more than 1 name from the list box, it will bring up the first person selected fine, but after that it flips out. If i only select 1 name, it will bring up one page with good data, and 7 pages of nothingness.
Another example: If I select 3 names, it will bring up the first person fine, but there will be 23 pages of nothing behind it.
There are 8 names on the list... so it must be running thru each one and pulling nothing... possibly?