combo box when asking for paramater value

  • Thread starter Thread starter wmii
  • Start date Start date
W

wmii

I have a vendor list of over 1300 entries with some wierd
names in it. Right now, when I try to do a search by
vendor, i have to type in the vendor name exactly.

Is there anyway to attach a combo list to the "enter
paramater value" box that appears to run the query so i
can choose the name from my vendor list table?

Thanks
WM
 
No can do in a query parameter prompt.
But if you make an unbound form and add
the combo box to it, you can select the name
from the combo box and the query will
return those records.

In the query criteria for that field, write:

forms!NameOfForm!ComboName

The next step depends on what you are doing with this.
If you are just going to read the query,
add a command button to the form.

Code it's Click event:
DoCmd.OpenQuery "QueryName"
DoCmd.Close acForm, Me.Name

To run the query, open this form.
Enter the combo data. Click the button.

However, if you are using the query as record source
for a report, code the command button click event:
Me.Visible = False

Then code the report's Open event:
DoCmd.OpenForm "FormName", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "FormName"

When ready to run the report, open the report.
The report opens the form. When you enter the
data and click the command button the report
will print/preview. You never see the query.
When the report closes it will also close the form.
 
As an Accountant that was asked to "take a quick look" at
the Database at my new job, you are making my brain
hurt...lol

I will read over what you said and attempt it tomorrow. I
am sure I will become a regular fixture here till I can
get back to actually doing accounting.

Thanks alot for your help in this matter.
 
Back
Top