Enter Parameter Value pop-up... Can I change the look?

ml8889

Registered User.
Local time
Today, 13:51
Joined
Oct 12, 2012
Messages
19
I have a form that has a button the activates a report that is based on a query with a parameter. The parameter asks for the begin date and end date; it's for the same field in the query. (I used Between/And.) I don't like the little gray pop-up for the parameter value. Is there a way to customize the look?

Would a Calendar control work to choose the begin and end date? Or are there no options? Your help is appreciated.
 
Last edited:
To change the look of the parameter window, you will need change the way your query is written. Rather than relying on an undefined parameter, you would need to either define the two dates on your current form or pop up your own custom form into which you user must enter the dates.

In either event you will have more control over what the user enters as you have the opportunity to validate his input , you could as you suggest implement a date picker for ease of data entry. Your criteria in your query for each date would be;
Code:
[Forms]![YourFormName]![YOurControlName]
 
Hi and thanks. Just to make sure I understand... So in my original table that the query is based upon, I should have 2 fields, begin and end date fields, if I'm going to make this work; is that correct? It won't work when the dates are being querired from the same field, correct? Thanks again for your help.
 
No you don't need to change your current table structure.

You could simply have two unbound fields on your form, one for start date the other for end date. Then as part of the code you are using to open your query you could check firstly that the fields held dates and secondly that the start date was earlier than the end date.
 
OK. And please forgive me as I'm used to working with Access but not so much with writing code. I have a form that has a link to the report that is based on that query. I just have an OnClick macro that opens the report. I havent written any special code for it. (I promise I'll learn more about writing code!)

So I should have the link open a custom form that I'll create that has 2 unbound text boxes with date pickers (or data-entry), and when the 2 dates are selected by the user, the resulting report will show... is that correct?

If all I've said is correct, what do I do [or write] to make the report execute once the dates for the range are selected on my custom form?
 
Have a look at the attached DB, specifically the code behind the On Click event of the button.
 

Attachments

Users who are viewing this thread

Back
Top Bottom