C
CRH
I want a drop down box of valid values on my parameter query. Per online
examples, I created a form, which allows me to see a drop down box of valid
values and to click on one of the values.
The form works. It opens with (choose one) in the drop down box. Clicking
on the box shows me all of my valid choices, in sorted order. Clicking on
one of the choices makes it the selected one on the form.
Form Name: Status Prompt Form
Field Name: StatusDesc
Border Style: Dialog
Default Value: "(choose one)"
Row Source:
SELECT [Status Table].StatusID, [Status Table].StatusDesc FROM [Status
Table] ORDER BY [Status Table].StatusDesc;
I then have a Query, which almost works:
Query Name: Info by Status (prompt) Query
Field Name: StatusDesc
Table: Status Table
Sort: Ascending
Show: [checked]
Criteria: [Forms]![Status Prompt Form]![StatusDesc]
When I run the Query, instead of getting my form, I get the standard
parameter dialog box. like this:
Dialog Box Heading: Enter Parameter Value [?] [X]
Dialog Box Content:
First this line of text:
Forms!Status Prompt Form!StatusDesc
followed by a text box
[ ]
then [OK] and [Cancel] buttons
If I type a known good value into the text box and click [OK], the query
returns the correct records.
But notice that the query defaulted to the standard parameter box, where I
have to know the valid values ahead of time. So putting in a bad value, or
no value at all, returns an empty record set.
I want the query to use my form.
Can someone help tell me what I'm doing wrong, please?
Thank you,
- Cathy H.
examples, I created a form, which allows me to see a drop down box of valid
values and to click on one of the values.
The form works. It opens with (choose one) in the drop down box. Clicking
on the box shows me all of my valid choices, in sorted order. Clicking on
one of the choices makes it the selected one on the form.
Form Name: Status Prompt Form
Field Name: StatusDesc
Border Style: Dialog
Default Value: "(choose one)"
Row Source:
SELECT [Status Table].StatusID, [Status Table].StatusDesc FROM [Status
Table] ORDER BY [Status Table].StatusDesc;
I then have a Query, which almost works:
Query Name: Info by Status (prompt) Query
Field Name: StatusDesc
Table: Status Table
Sort: Ascending
Show: [checked]
Criteria: [Forms]![Status Prompt Form]![StatusDesc]
When I run the Query, instead of getting my form, I get the standard
parameter dialog box. like this:
Dialog Box Heading: Enter Parameter Value [?] [X]
Dialog Box Content:
First this line of text:
Forms!Status Prompt Form!StatusDesc
followed by a text box
[ ]
then [OK] and [Cancel] buttons
If I type a known good value into the text box and click [OK], the query
returns the correct records.
But notice that the query defaulted to the standard parameter box, where I
have to know the valid values ahead of time. So putting in a bad value, or
no value at all, returns an empty record set.
I want the query to use my form.
Can someone help tell me what I'm doing wrong, please?
Thank you,
- Cathy H.