We help IT Professionals succeed at work.
Get Started

MS Access 2010 Form Button, Query, Report

Last Modified: 2012-05-12
Dear Experts,

  I created a Form, a Query and a Report in MS Access 2010.  How do I tight these 3 components together, so when a button is clicked on the Form, the Report will show up and displaying the records according the fields in the Form.


the form has 3 text fields and a command button.
3 text fields:  passing Date, ModelName, Color parameters.

1 command  button: when button is clicked, the report will show up and displaying the records according to the fields in the 3 text fields.

a Query statement showing all records regarding the 3 parameters that are passed from the form.
this query's WHERE clause refers to the Form and the 3 parameters.
When click Run, this query is running fine by itself and displaying records.


a report is made and set the control source to the name of the above query.

My Question

The command button of the Form has an onClick event tight to a Macro with an Action of "SetValue": item = [visible]   expression = no

The Report will display records without problems if I do the following:

1. Enter the values of the 3 parameters on the Form.
2. Click the command button.  -> then this Form goes away.
3. Navigate to Queries in MS Access. Click on the Query  -> then records shows in grid view.
4. Navigate to Reports in MS Access. Click on the Report -> the records of the Query show in the Report.

How do I tight together the command button on the Form, the Query, and the Report together, so when I click on the command button on the form , the Report will open and display the records according to the 3 text fields on the Form?

Thank you!

Watch Question
Most Valuable Expert 2012
Top Expert 2013
This problem has been solved!
Unlock 3 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE