Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access prompts for variable value repeatedly

Status
Not open for further replies.

MarcK

Programmer
Aug 14, 2001
2
US
I have a query which asks the user to enter a date. This date is then passed as an argument to a simple vb function, along with a date from a table, which returns a value representing the comparison of the two dates.

The query works fine, but Access asks me to enter the date two or sometimes three times before returning the results of the query.

I presume this is a standard problem with a standard answer? If desired, I will be happy to post a simplified form of the query and the function.

Thank you very much for any help.
 
I think I've done the same thing. I put a date on the form that created the report. Then I made another form, a PrintForm, which prompts for the date of the report to print. The two are compared and I get a print of the correct report. Here's how I did it:

In the design view of my query, I included the date of the main form. On the criteria line, I put:

[Forms]![PrintForm]![txtPromptDate]

Now, as long as I use the PrintForm to print the report, I don't get prompted for the dates. However, if I go into Reports and preview reports there, I'll still be prompted, because from there, the report doesn't know what date to show.
 
Thank you for the solution.

Is there any advantage to this behavior by Access?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top