multiple parameter query

scottappleford

Registered User.
Local time
Today, 01:35
Joined
Dec 10, 2002
Messages
134
Hi

Apreciate your help on this.

I have a stock control db and when goods are recieved they could have a different references on them e.g. our internal ref, the purchase order ref etc.

I would like to run a query that firsts ask what criteria i want to use to run the query e.g use the int ref or the PO nr. I can set up a simple parameter query in one field but can not find a solution for the db asking what field i want to use before you put in the reference?

many thanks

scott
 
still need help

Hi thanks for that.

I think I understand the form/unbound controls bit.

What do I do after that? Add all the code to each control? and where/how?

sorry for my lack of knowledge but thanks for your help.

scott
 
Use a command button to run the query. This will allow the user to populate as many of the boxes as they wish.
 
help still needed!

Thanks for tthe advice, however i am still un sure what you mean.

if i just add a command button and run the query it does not give me the option of users being able select how they want to search.

In an ideal world - i would like people to run the query by - pressing the appropriate button on the switchboard, which will open a small form with different serach critieria i.e. on the form a control for internal ref and/or purchase order number and/or person who ordered etc. Thet would then type the info into the relevant box and this would close the small form and open the results.

all this is far beyond me at the moment and your help is greatly appreciated. i can make forms/queries, alter properties etc - but the advanced stuff is what i am lacking but hoping to learn. i have searched the help files and the forums but can not find anything on this that i understand.

thanks

scott

p.s. hope i explained a little better as in previosu posts i maybe expect people to be mind readers - sorry.
 
The stuff that Pat Hartman has given you will work as you require.

If you want to see it in the context of a database look at the following thread:

http://www.access-programmers.co.uk/forums/showthread.php?p=393078#post393078

This shows a sample database where there are several options available on a form. The user can choose to input in as many fields as required, or leave them blank (Pat's code allows for this by letting a form control have a null value). When the user presses the command button it launches a report. The report is based on a sql statement according to the form values (i.e. Pat's code). Take a look and see if it helps.

James
 
thanks guys but...

thanks for all your help - i am getting there - got the unbound controls on my form using combox box to link to query.

the code pat gave me - i put in the on click event of my command button? do i need to change any of it or can i just copy and past it?

Many Thanks

Scott
 

Users who are viewing this thread

Back
Top Bottom