Also, there is an easier way to do this using criteria in the query itself, rather than passing this string. For example, on the column in the query for RecordNumber, add this criteria:
[Forms]![frmYourFormName].[scboRecordNumber]
The query will go out and fetch this itself when you open the report that uses the query as the data source. So your only code is to open the report.
mmcdonal
|