ComboBox, filtering a SubForm

sha7jpm

Registered User.
Local time
Today, 17:32
Joined
Aug 16, 2002
Messages
205
I have two combo boxes and a subform.

one combo box is the project code.

and the other combo box is the description of the project instrument. there are many instruments to a project code.

I want the subform to change when I select the project code (which it does) but then the instrument list is filtered to only include the instruments for the project code I have selected.

therefore the subform will show the project code I select and then filter further on the instrument I select.

I can't seem to relate the instrument combo box to the project code combo box.

cheers in advance of the genius from someone which I am blatantly lacking in...

ta

John
 
IGNORE ABOVE HELP REQUEST ta!

please ignore the previous mailing.
 
cheers!

sorry Hayley,

thanks for that,

as I was looking at the form again,I decided on a different format

wherby the database asks the user in a popup box for the project code and then for the instrument

then the form displays the resulting info.

I would want these popup boxes as comboboxes so will have a look at the synchronisation thread you mentioned.

do you know how to actually display the combo box as a popup? seems that I can only show a textbox where the user types in the project code rather than selects from a list.

ta

john
 
Further Query

that was very useful thankyou.

the problem I have at present ... the two combo boxes work fine.

i now need to attach about 5 text boxes to the combo box.

so...

the first combo box picks the project code.
the second picks the intrument within the project.

thus, the text boxes then show the details for that particular record.

but cannot seem to make the text boxes pick up the data specified in the combo boxes.

I had thought of having a query which picks up the combo box values and shows the other data needed. then I would ref the text boxes to this query.

I tried the setvalue expression to record the content of the combo box for the query, but the query is continously blank.

any pointers! thanks for all your help..
John
 
Hi John

The easiest way to do this if you are not familiar with VBA is to firstly base your form on the table/Query with the data you need then the second combo where you are looking to pull the information.

Create a new combo on your form step through the wizard select option 3 find record on my form then add the where part so it looks to combo 1 first. This should then pull your data on selecting from the second combo.

Or if you feel confident enough you can look at the coding in the first example I posted and you could do it this way also. If you are new to access my advice is to go with the first option.

John just re reading your post what layout did you decide on in the end because this will obviously make a difference.

HTH
Hay
 
Last edited:
success!

Hayley,

thanks for all your help, I appreciate the time and patience!

I managed to bodge it, and this is how it now works.

have the two combo boxes.

a query with the other data I need runs off that form. with critieria based on the combo box selections.

I then made a macro to run the query and built a new form to show the result of the query, hence giving me the record the user requires from the options on the combo box. the macro closes down the query etc to leave the resulting form.

I am sure most access users would baulk at the clunkiness of all that. but it does work, which is the main thing.

cheers

John
 

Users who are viewing this thread

Back
Top Bottom