We help IT Professionals succeed at work.

How do I store an Access parameter when I'm first asked to enter the value?

Anthony6890
Anthony6890 asked
on
Medium Priority
290 Views
Last Modified: 2012-05-11
Hi everyone,

I currently have an Access database that asks for a RUN_DATE parameter where I'm required to input a run date.  My problem is that I don't want to have to continually put that date in when I run a report or look at a query.  Is there any way that I can have access save that value or that I can define my RUN_DATE parameter to a fixed value for the time I want to run it and then I just change that field as I want different dates?

I hope I was somewhat clear on what I want to do.

-Anthony
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
I would list all your date choices in a combo box - then on making a selection, the click event of the combo box fires and will execute the code according.

If you have a saved query qryFromCombo with SQL along the lines of:

SELECT * FROM myTable WHERE myDate = Forms!myForm!myCombo

In the Click event of the combo:

Private Sub myCombo_Click()
  DoCmd.OpenQuery "qryFromCombo"
End Sub

Armen Stein - Microsoft Access MVP since 2006President, J Street Technology
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Hey everyone,

Thanks for getting back to me.  Sorry it took so long, I was away for the holiday weekend.

I was able to get it work using the forms as suggested above.

Thanks again!

-Anthony
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.