That is the basic idea. I have the report's datasource set to a query to begin with, and in a field "LastName" in the query I have the filter criteria

Like[Enter the beginning of the last name:] & "*"

so that when the user opens the query a window appears that prompts them to enter the first letters of the last name. At another place in the program I need to be able to directly pass the LastName parameter without prompting the user for input. I can change the recordsource in the ReportOpen routine like you said, but the window still appears prompting the user for input.