User Intervention required

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I am trying to make a query that when the query is
executed it will promt the user to enter the "vendor" they
are looking for. I know that if i put in the string [Enter
Vendor Name:] into the query criteria it would ask them to
input the information but then they would have to spell it
right. Is there a way to get a drop down box with all of
their choices in it to pick from or is there another way i
should approach this?

Thanx
 
One way to do it would be to use the following in the
criteria instead of what you have:

Like ("*" & [Enter Vendor Name:] & "*")

The drawback is if they are to vague you will get multiple
results ... for example if you put in the letter S you
will get all vendors with an S in the name ...

HTH

Mathew
 
I am trying to make a query that when the query is
executed it will promt the user to enter the "vendor" they
are looking for. I know that if i put in the string [Enter
Vendor Name:] into the query criteria it would ask them to
input the information but then they would have to spell it
right. Is there a way to get a drop down box with all of
their choices in it to pick from or is there another way i
should approach this?

Thanx

Chris,
You should be searching the VendorID, not the Vendor Name.

Use a form instead.
Add a combo box to the form that contains the VendorID and the Vendor
Name. Sort the list on the VendorName field.
You can make the VendorID column not show by setting it's width to 0".
Set the combo box bound column to 1.

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 VendorID field, write:
forms!FormName!ComboBoxName

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