Share via

Editing the ENTER PARAMETER Display Box

Anonymous
2010-11-18T18:04:01+00:00

How do I edit the fields in the ENTER PARAMETER Display Box?  I can edit the actual parameter query but not the initial display that requests the user to enter the actual parameter.  Thanks.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

ScottGem 68,830 Reputation points Volunteer Moderator
2010-11-18T18:15:26+00:00

If you are referring to the prompt to enter data when using a parameter prompt query, you can't. Which is one reason why I almost never use parameter prompt queries. Instead I create a form, to supply criteria to my queries. This works because you can refer to a value in a control on an open form using the syntax:

=Forms!formname!controlname

So, lets say I wanted the user to enter a date to filter the query for only records after that date. I would enter the criteria in the date column of my query as:

>Forms!frmDateParameter!txtStartDate

The control can be ANY valid control like a combo or listbox. You add a button to the form to open the query (or more usually a report based on the query).


Hope this helps, Scott<> P.S. Please post a response to let us know whether our answer helped or not. Microsoft Access MVP 2010 Blog: http://scottgem.spaces.live.com/blog Author: Microsoft Office Access 2007 VBA Technical Editor for: Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports and Queries

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2010-11-18T18:19:52+00:00

The only thing you can specify is the name of the value you need to enter.  For example, if your query uses

   [Enter Date]

and you want it to prompt you for the start date, then change the query to use something like:

   [Enter Start Date]

A better way to to use query parameters is to use a form with a text box where you can enter the date.  The text box's attached label can have its Caption set to the whatever you want to indicate what to enter.  In this case the query parameter would look like:

   Forms![name of the form].[name of the text box]

Then you can use a button on the form to open the query, another form or a report based on the query.

If the query is used as the record source for a form or report, you can take it to yet another level by using the OpenForm/OpenReport method's WhereCondition argument and remove the criteria from the query so there is no parameter at all.

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-11-18T20:48:18+00:00

    You're the second to suggest using forms - think I will try it.  Thank you very much!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-11-18T20:47:53+00:00

    Thanks so much! I think I'll give that a shot.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-11-18T18:13:41+00:00

    Can you clarify what you mean by "the actual parameter query" and "the initial display"?


    Doug Steele, Microsoft Access MVP

    http://www.AccessMVP.com/djsteele (no e-mails, please!)

    Was this answer helpful?

    0 comments No comments