Combo box Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi-

I have a form that has 2 Combo boxes. Drop1 and drop2

row source for Drop1 is a list of values in a table.
row source for Drop2 is based on what users selects in drop1.

In the form as soon as the user selects a value from drop1, drop2 values
must be refreshed based on the value from drop1.

How do i do this.

any help is greatly appreciated.

Thank you,
 
In the onChange event for ctlCombo1....

Select Case Me!ctlCombo1
Case "Selection 1"
Me!ctlCombo2.RowSource = "qrySelection1"
Case "Selection 2"
Me!ctlCombo2.RowSource = "qrySelection2"
End Select

BrerGoose
 
To refresh Drop2 after Drop1 changes, in the Drop1_AfterUpdate event add

Drop2.requery

This assumes that the drop2 query is already referencing the drop1.value
in its source sql.

hth,
Andy
 
The concept, BTW, is known as "cascading combo boxes."
To refresh Drop2 after Drop1 changes, in the Drop1_AfterUpdate event add

Drop2.requery

This assumes that the drop2 query is already referencing the drop1.value
in its source sql.

hth,
Andy
[quoted text clipped - 11 lines]
Thank you,

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
Back
Top