By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,255 Members | 2,640 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,255 IT Pros & Developers. It's quick & easy.

How to show entered criteria from a query on a report?

Daniel B
P: 33
I have a query that generates a report based on two manually entered dates (Start Date and Stop Date). The report then shows the data that is relevant between the two entered dates.

I would like to be able to display the two entered dates at the top of the report, just as a visual aid to the user. Any help on how this can be done??


Daniel B.
Aug 23 '11 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 10K+
P: 12,366
Create a form for the entry and then reference those controls in the query and the report
Aug 23 '11 #2

Expert Mod 15k+
P: 31,494
Manually entered values to queries (Parameters) should be used manually only at the most basic level (a quick query knocked up to test something out), and programatically at a more advanced level (where the values are entered from the code itself). Your usage of this approach is not appropriate as it will not support what you're trying to achieve. Rabbit's suggestion, on the other hand, makes everything simple and straightforward again for you.

A slight alternative would be, using the same form concept, to open the report passing a WhereCondition parameter to set the .Filter and an OpenArgs parameter to pass the data to the report. This leaves complex form references out of the process.

Neither way is much better or worse than the other. They are simply alternatives of which some prefer one and others the other. You choose whichever suits you best. For referencing items on forms though you can check out Referring to Items on a Sub-Form.
Aug 24 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.