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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enter Parameter Value Appears at form open

Status
Not open for further replies.

migv1

Technical User
Apr 23, 2004
39
0
0
US
I have a main form that is based on a query, which in turn gets a parameter (year) from a form (Select Year) that appears in response to the On Open event for the main form.

When the main form is called, an Enter Parameter Value dialog appears. This doesn't do anything for the query, since you can type anything, click OK or Cancel, and the Select Year form still comes up after you dismiss the Enter Parameter Value dialog and the program continues functioning as designed.

Is there a way to intercept the Enter Parameter Value and dismiss it so that the user goes straight to the Select Year form? I tried SendKeys and other tricks, but I can't seem to find the place in the sequence of form events that comes before the Enter Parameter Value dialog appears so that I can dismiss it programatically (or keep it from appearing).

The query behind the form requires the Year parameter from the Select Year form (Forms!frmSelectYear!cboYear) in order to return data for the selected year.

Thanks in advance for any help.
 
If you have parameters set using the [] or if you have some field that the query does not understand, you will get that dialog box. If you want to use somethig from a form in your query, you should look up "query by form" in the Access Help. It i will explain how you need to set that up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top