select from list

aman909

Registered User.
Local time
Today, 13:04
Joined
Jun 20, 2007
Messages
28
What i have is a stock control system. What i would like is to be able to display all the colours we have in a list.

Then from this list be able to select a colour and then show all the stock levels for this.

How do you suggest the best way to do this?
 
Create a query to fetch the stock levels, and on the criteria of the colour, make it the value selected in the list box. :)
 
How do i make the criteria of the colour to be the value selected in the list box
 
In the query, in its criteria box, put something like the following, obviously adapting it to your system :

Code:
[Forms]![Form Name Here].[List Box Name Here]
 
I have tried what you said to put in the critera. i put in:

[Forms]![Stock]![Supplier Colour]

It didn't work
 
Don't put the ! between [stock] and [Supplier Colour], just a fullstop, but make sure you keep the ! between [Forms] and [Stock]
 
I have now changed that from ! to . But now everytime i run the query it is asking me to enter a parameter value
 
hmm firstly check the spelling of everything in there, must be identical to the form you're using the the actual name of the list box. Quick thought, what is the list box taking its values from? a table or have you just given it a list of values? If it's from a table it my be getting the ID number when you click it rather than the name of the colour, if so then change the query so that the ID has the criteria of that list box.

If not then you could go about it another way.

Put a small text box somewhere on the form, and make it hidden so no one sees it. Then when you click a value in the list box, make the new text box equal to the value you select from the list, THEN run the query and have the criteria of the query equal to that text box instead.
 

Users who are viewing this thread

Back
Top Bottom