Method 1. Use a Yes/No Field.
You can select only contiguous records in a datasheet. To work around that,
add a yes/no field to your table. You can then check the boxes of the
records you want to print, and then:
DoCmd.OpenReport "MyReport", acViewPreview, , "[IsPicked] = True"
To clear all the boxes again:
dbEngine(0)(0).Execute "UPDATE MyTable SET IsPicked = False WHERE
IsPicked = True;", dbFailOnError
Method 2. Use an unbound multi-select list box to choose the values for the
report.
Details in:
Use a multi-select list box to filter a report
at:
http://members.iinet.net.au/~allenbrowne/ser-50.html
Method 3. Print a contiguous range selected in a datasheet.
Use SelTop and SelHeight to identify which records are selected. Then loop
through those records, concatenating the primary key values into a string
that can be used with the IN operator in the WhereCondition of the
OpenReport action. The example above will illustrate the string you are
trying to build.