Filter / Tailor Report Based On User Selection

Daryl

Registered User.
Local time
Yesterday, 23:24
Joined
May 22, 2001
Messages
34
I have a report based on a query. I've run the query and then selected the 'Filter By Selection' button to get the results the user wants. Rather than have me run these reports at each user's request, I need to be able to filter the query based on the user's selection of a field before generating the report. Using a parameter is no help because the user doesn't now what code to input. So the user needs to lookup a code from another query (the code is in a lookup table), and then pass it to the query before it runs and then generate the report. Any ideas how can I do this?
 
Put the query results into a text box on your form. Then run the report from that form with:
DoCmd.OpenReport "ReportName",acViewPreview,,"[CodeField] = '" & Me.CodeFieldTextBox & "'"

(I assume here that CodeField is text. If it's numeric, you don't need the single quotes enclosing it.)
 

Users who are viewing this thread

Back
Top Bottom