Prompt

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H
Is it possible to specify the criteria in a query so that the user gets prompted with a drop down box, I have used the syntax

LIKE [Enter product

but I would like the user to select the item instead of typing it in. Please help!
 
No.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Beginner said:
Hi
Is it possible to specify the criteria in a query so that the user gets
prompted with a drop down box, I have used the syntax:
LIKE [Enter product]

but I would like the user to select the item instead of typing it in.
Please help!
 
No, as it pertains to the simple use of the parameter query functionality
that is supplied with Access. You can always build your own form, and
prompt the user on your own by opening the form, and have the query point to
the combobox instead of just a basic parameter... is what I meant to say.
:-)

Beginner said:
Hi
Is it possible to specify the criteria in a query so that the user gets
prompted with a drop down box, I have used the syntax:
LIKE [Enter product]

but I would like the user to select the item instead of typing it in.
Please help!
 
Hi Is it possible to specify the criteria in a query so that the
user gets prompted with a drop down box, I have used the syntax:

LIKE [Enter product]

but I would like the user to select the item instead of typing it
in. Please help!

Sure, that's the way to do it.
Use a form.
Add a combo box to the form that contains the the Product list.
** Make sure the Combo Box's Bound Column Datatype is the same as the
datatype of the Query Product field. **

Add a command button to the form.
Code it's click event:

DoCmd.OpenQuery "QueryName"
DoCmd.Close acForm, Me.Name

In the query, as criteria for the Product field, write:
Like forms!FormName!ComboBoxName

When you wish to run the query, first open this form.
Select the Product from the combo box.
Click on the command button.
The query will display and the form will close.
 
Back
Top