CommandButton & Combobox

C

Chuckie

1) I’ve created a combobox1 that takes values from field1
in table1. However I want it to link to my combobox2. My
combobox2 takes values from field2 in table1. However, I
want the values of combobox2 to only be related to the
value selected in combobox1. I’ve used the afterupdate
button of combobox1 using code cbo2.requery, but it does
not work. Does anyone know how to get it to work?

2) When the value in combobox2 is selected I’d like to
have a command button right next to it. I’d like the
commandbutton to link to it’s combobox2’s specific record
located on my form2. Form2 was created using the form
wizard and has all my table fields include (which has
those arrow buttons on the lower left corner to change
through records). Does anyone know how to create the link?

I have microsoft access 2000, and the value selected in my
combobox2 is unique.

So basically I need help with:
1) having the right code in my afterupdate section of
combobox1 to lead to combobox2
2) create a command button to link to the combobox2’s
specific record in form2

Thanks =)
 
D

Dan Artuso

Hi,
For 1)
In the query that is the row source for combo 2, put a criteria
of:
Forms!yourForm!cbo1

use your own names of course.
When you requery combo 2 it should display the related values.

For 2)
Do you mean you want the button to open Form2 and display the record that
relates to what you've selected in both combos?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top