Running a report for different criteria in the query

mb1980

Registered User.
Local time
Today, 04:20
Joined
Aug 20, 2007
Messages
14
I am running a report from a query and I am looking to be able to select the criteria in the query when I run the report, if that makes sense. Basically I guess I want to be able to type in the criteria to run the report off instead of going in and amending the query every time I wasnt to change the criteria. This might sound basic stuff to some of you guys but I am a bit stuck. :confused:

Thanks.
 
There are plenty of options to do this. You can do it with controls or the parameter pop-ups from the query. First, you have to decide how you want to do it...
You should look up "Query by Form" in the Help Menu.

If you need more information on HOW to do it, just say so...
 
There are plenty of options to do this. You can do it with controls or the parameter pop-ups from the query. First, you have to decide how you want to do it...
You should look up "Query by Form" in the Help Menu.

If you need more information on HOW to do it, just say so...

SO!! Joke :) I could do with some advice though as I am a bit stuck with this basic task lol, at the minute I am running a report from a query and just going into the query and changing the one field to run each report, ideally what I need is to open the report and choose the field I am changing from a list box or whatever really. Hope you can help me out :)

Thanks.
 
Are you running a report with one field?? Why??

I don't believe you can use field names as parameters as they are evaluated to filter records based on your field selections in the table. How about including all of your fields on the report, then using .Visible = False for the fields that do not have the name of your form field value??
 
Are you running a report with one field?? Why??

I don't believe you can use field names as parameters as they are evaluated to filter records based on your field selections in the table. How about including all of your fields on the report, then using .Visible = False for the fields that do not have the name of your form field value??

Well, since the person mentioned changing the criteria in the first message posting, can we assume he meant to say "changing the criteria" rather than "changing the field?"

The easiest way to do it is to be in the QBE grid. That's where you've been typing in your criteria. Where you would type the criteria, instead type [Ask a question to your user]. (Obviously, replace the text I just typed with a question relevant to your situation.)

EX: [Please enter the name of the person]

If it's a date range, enter....

between [Enter Starting Date] and [Enter Ending Date]

(I always make the words "between" and "and" lowercase, since Access will capitalize them if it understood what you wrote.)

Hope this helps.
 
Well, since the person mentioned changing the criteria in the first message posting, can we assume he meant to say "changing the criteria" rather than "changing the field?"

The easiest way to do it is to be in the QBE grid. That's where you've been typing in your criteria. Where you would type the criteria, instead type [Ask a question to your user]. (Obviously, replace the text I just typed with a question relevant to your situation.)

EX: [Please enter the name of the person]

If it's a date range, enter....

between [Enter Starting Date] and [Enter Ending Date]

(I always make the words "between" and "and" lowercase, since Access will capitalize them if it understood what you wrote.)

Hope this helps.


Yes indeed, thank you very much :) that has sorted it for me and I have exacly what I want. Much appreciated
 
Yes indeed, thank you very much :) that has sorted it for me and I have exacly what I want. Much appreciated

No prob. :) Got help myself earlier on this site and just wanted to pay it back.
 
Just to advance it a bit, is it possible to have a drop down menu instead of typing in? I would ideally like to have the field list I am choosing from and also another field shown, example the code for which I am reporting on and also the description of this code.
 
maybe a list box?? You'd have to manually type the field names in as the value list though...

Criteria with a control will require you to code an event instead of the query prompting you for input data.
 

Users who are viewing this thread

Back
Top Bottom