"Enter Parameter Value" box

whitebear

Registered User.
Local time
Today, 03:28
Joined
Apr 6, 2010
Messages
37
Hi

I have two combo boxes so that I can select a range when I want to generate a report.

I have created the query, but when I select the values in the combo boxes and press the button, instead of access getting the information needed from the combo boxes, a pop up box appears asking me to enter the paramerter values.

Can anyone help?

I know it'll be an simple fix but for the life of me I cant see where!

Thanks

WB
 
are you putting forms!yourformname.yourcomboboxname in the criteria for the query? or just the comboboxname?
 
What code does your button use? Is it running a report that is pulling from a query? If so please post your query. If it is doing this, you probably need to reference the combo boxes in the query, in the QBE you can use the builder to do this.
 
Between [forms]![StockItemsSuppliersItemNumber]![comboSuppliers3] And [forms]![StockItemsSuppliersItemNumber]![comboSuppliers4] - this is the code on my query and I've ensured the combo box names are matching.
 
The form doesnt have a subform or anything on it does it?
 
Nope, just other combo boxes and buttons which generate reports.
 
The only other issue I would say to check is that the formname is correct and the combo names are correct..which you said you have already checked. Can you post up a sample so we could take a look?
 
compact it, zip it and post it using the go advanced option and attach it to your post.

Edit: I guess you dont have to zip it if its an mdb file
 
Here you go.

Its probably a bit messy compared to your standard (garunteed actually).

The form with all the combo boxes on and the buttons is named "Stock Items Suppliers". Only 2 of the functions are actually working (top two on the left) and all the rest throw up errors.

Thanks again
WB
 

Attachments

Ok so a couple issues here.

Your item number query has the wrong form name in for the query.

You form name is StockItemsSuppliers and you have StockItemsSuppliersItemNumbers

Same for your preview by supplier, but you also have the wrong report name in your macro, so that is the 2nd error you will get.

Your StockItemsSuppliersortedbyDesc query has supplier in it and not supplierID so your report was not returning anything for that.

Im not sure what your preview report to view all suppliers is trying to open, but im sure you can figure that out based on what i've given you here.

Take a look and if you have questions let me know
 

Attachments

Thats great, I understand everything you've said.

I've adjusted the "StockItemsByDescAndSuppliersCombo" query to add the criteria (so that when I select the combo boxes the required report is created), but as soon as I add a criteria the query goes blank so I remove the criteria again and the data reappears.

I looked back at the "StockItemsItemRange" query and the data is in the datasheet view no matter if the criteria box is filled or not.
 
I've adjusted the "StockItemsByDescAndSuppliersCombo" query to add the criteria (so that when I select the combo boxes the required report is created), but as soon as I add a criteria the query goes blank so I remove the criteria again and the data reappears.

K im confused by this. What query are you talking about? I do not see it in the sample you gave me.

I looked back at the "StockItemsItemRange" query and the data is in the datasheet view no matter if the criteria box is filled or not.

Thats not what I get when I look at it. If I do not have anything in the combos, i get prompted for the entries. and when adjusted the query returns only the requested information.

Did you use the database I gave you or adjust the database you have based on what I sent back to you?
 
I've updated the one you gave me, creating a new query.

If you refer to the "StockItemsSuppliers" (of the attached) and attempt to pull a report from the bottom to combo's, then no data is outputted onto the report.

(Sorry for the confusion)
 

Attachments

You have the same issue where you are using the criteria under the suppliername and not the supplierID.. change that and you will get your results
 
Thats worked great, thanks. But im still confused because looking at the "StockItems" query the criteria is under the supplier name and not the supplier ID, however the combo report generator still works.
 
With that one, your combobox query does not have the ID in it so that the "value" of the combobox is actually your suppliername.

I would adjust it so that it matches your other queries.
 

Users who are viewing this thread

Back
Top Bottom