Lil,
Whenever I need to get the "value" associated with a listbox that has its
multi-select property set to either "simple" or "extended", I call the
subroutine below.
In your case, it sounds like you have a listbox on your form, and probably a
command button to print or preview the report. Assuming you have the command
button, you would use the click event to open the report and pass the
OpenReport method a criteria string which will limit which records are
visible in your report.
Private Sub cmd_Preview_Click
dim strCriteria as string
strCriteria = "[fieldname] " & fnMultiList(me.listName)
docmd.OpenReport "reportname", acViewPreview,,strCriteria, acDialog
End Sub
You will need to create a standard code module (not tied to a form) and add
the following code to it. This code will concatenate the values of the bound
column of the items that are selected in your listbox. If no items are
selected, it acts as if all items are selected, so if you don't want that
behavior, you will have to modify the code. Otherwise, it will determine how
many items were selected and if it is only 1, will return a string that
starts with an equal sign (=). If multiple items are selected, it will
return a string that include the "IN ( )" clause, with the selected values
wrapped in the ( ).