SMP319
asked on
Using a form to set criteria for a report
As mentioned in the related question, i would like to understand how to complete the same task using a form to chose the criteria
Also, you can open your Form in Dialog mode, have the user select the parameters, then minimize the form, print the report and close the Form with the Report's OnClose Event.
ET
ET
This question has been addressed hundreds of times here.
There are quite a few different approaches to this, depending on your exact needs and skill level.
See here as a start:
http://www.google.com/search?q=site%3Awww.experts-exchange.com+microsoft+Access+filter+report++from+by+a+form
There are quite a few different approaches to this, depending on your exact needs and skill level.
See here as a start:
http://www.google.com/search?q=site%3Awww.experts-exchange.com+microsoft+Access+filter+report++from+by+a+form
ASKER
Thanks for the reponses. I ended up updating the code from my previous question to look at the value from the combo boxes in the form.
[Division]=[Forms]![Organi zation Selection]![Combo9] And [Organization]=[Forms]![Or ganization Selection]![Combo13]
my only issue with this is that once the report opens, i need to close the report and then rerun the form before the values will update in the report. Is there a way to have multiple reports open based on different criteria in the form. or at the least have the report update as soon as the form is updated.
Here is a copy of the database
Account-Project-Management.accdb
[Division]=[Forms]![Organi
my only issue with this is that once the report opens, i need to close the report and then rerun the form before the values will update in the report. Is there a way to have multiple reports open based on different criteria in the form. or at the least have the report update as soon as the form is updated.
Here is a copy of the database
Account-Project-Management.accdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I resolved my original question by altering the code from my Related question. So yes. Can i give myself the points :). But this created another question which you had resolved. I will award you the points. Thanks for the work around
ASKER
Thanks again
ASKER
on my initial test the report closed. however I noticed afterwards that the form is not clearing out the previuous request so when i change my selection i get no results. I have to close the database and reopen. is there code to clear the selection in the form
ASKER
Disregard the last post. other issue caused my error. Selected solution works
ok
2.) Open your form.
3.) Pass the parameter from your form to the report as shown below ....
On the Criteria line of the field in your query (say Trx_Date) enter
Between Forms!MyForm!TxtStartDate And Forms!MyForm!TxtEndDate
ET