From: RNicole on
I am building a table with several list boxes. When entering a record, I
want the user's selection in one list box to effect the choices in another
list box.

How do a create a list box that displays particular values based on another
list box

From: Kipp Woodard on
If you are using direct input into the table, I recommend that you switch to
use a form in datasheet mode.

If you are using a form in datasheet mode, then you use events to manage
when to requery your combo controls.

There are different approaches based on whether you are using queries or
value-lists as the source for you combo lists.

If you are using "Table/Query" as the RowSourceType of your combo lists,
then you should simply need to requery the combos in the on-enter event.

Private Sub Combo2_Enter()

Me.Combo2.Requery

End Sub

If you are using ValueList as the RowSourceType, then it would look like this:

Private Sub Combo2_Enter()

If Me.Combo1 = "Things" Then
Me.Combo2.RowSource = "Thing1; Thing2; Thing3;"
Else
Me.Combo2.RowSource = "Value1; Value2; Value3;"
End If

End Sub

"RNicole" wrote:

> I am building a table with several list boxes. When entering a record, I
> want the user's selection in one list box to effect the choices in another
> list box.
>
> How do a create a list box that displays particular values based on another
> list box
>
From: John W. Vinson on
On Mon, 21 Sep 2009 08:43:02 -0700, RNicole
<RNicole(a)discussions.microsoft.com> wrote:

>I am building a table with several list boxes. When entering a record, I
>want the user's selection in one list box to effect the choices in another
>list box.
>
>How do a create a list box that displays particular values based on another
>list box

Answered in the message you posted six minutes before.

Please have a little patience. We're all volunteers here, and this isn't a
chat room!
--

John W. Vinson [MVP]
 | 
Pages: 1
Prev: PROBL2ME DE LECTURE.
Next: www.farsi1.tv