synchronizing two combo boxes (which are on the same form)

F

frederic10_mess

Hello Folks,

I am trying to synchronizing two combo boxes (which are on the same
form) so that depending on what I select in combo box 1, I only see the
related info in combo box 2.

More explination below:

The first combo box must select a specific number which refer to a
specific Supplier name
Once the specific number is selected from the first combo box, I will
like to see the Supplier Name into the second combo box.

How can I do this?

Thanking you in advance for your help!!!

Fred.
 
D

Douglas J. Steele

It's not clear to me whether you're trying to limit what's in the second
combo box to a specific subset of values based on what's selected in the
first combo box (known as cascading combo boxex, and explained in detail at
http://office.microsoft.com/en-ca/access/HA011730581033.aspx?pid=CH063650361033),
or if you're trying to limit the second combo box to one specific value,
based on the value selected in the first combo. If the latter, it doesn't
really make sense to have a second combo box: simply put the supplier name
in a text box in the AfterUpdate event of the first combo box.
 
D

Douglas J. Steele

The RowSource for your combo box should be a query that returns both the
Department name and the Cost Centre number.

Assuming Department name is the first column, the AfterUpdate event for your
combo box would look like:

Private Sub MyCombo_AfterUpdate()

Me.CCentre = Me.MyCombo.Column(1)

End Sub

(the Column collection starts at 0)
 

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