Combo or list boxes

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

Guest

I have two combo/list boxes in a form that I need to display some specific data.
if combo/list box A has a a specific value then I would like combo/list box B to display specific set of potential values to pick from.

List A List B If the user picks Daniel in A, I would like
Daniel 1,3,4,5 the user to have the option of picking any of
Oliver 2,6,4,2 the values on list B.
John 3,4,2,9

Obviously I need some sort of conditional statement that, however I do not know enough programming in order to be able to do this, even if programming is required
Thank you very much,
Amorfosis
 
I have two combo/list boxes in a form that I need to display some specific data.
if combo/list box A has a a specific value then I would like combo/list box B to display specific set of potential values to pick from.

List A List B If the user picks Daniel in A, I would like
Daniel 1,3,4,5 the user to have the option of picking any of
Oliver 2,6,4,2 the values on list B.
John 3,4,2,9

Obviously I need some sort of conditional statement that, however I do not know enough programming in order to be able to do this, even if programming is required
Thank you very much,
Amorfosis

Where does Combo B get it's list values from?
Are they from a table, or is it a Value List?
It sounds like a Value List.

What is the datatype of the Bound Column of Combo A?
I'll assume it is Text.

Set the RowSourceType property of combo B to Value List.
Leave the RowSource blank.

Code the Combo A AfterUpdate event:

Dim strList as String
If Me!ComboA = "Daniel" then
strList = "'1','3','4','5'"
Elseif Me!ComboA = "Oliver" then
strList = "'2','6','4','2'"
Else
strList = "'3','4','2','9'"
End if
ComboB.Rowsource = strList
 
Back
Top