Change rowsource in Form (1 Viewer)

ntanh72

New member
Local time
Today, 01:29
Joined
Nov 16, 2009
Messages
7
Hi Guys,

Pls help with the below:

Combo 1: Order type
Combo 2: Customer name

I would like user to choose order type from Combo 1 and in Combo 2 they can choose the Customer groups belong to order type choosen in Combo 1.

I already try this but not work

************

Dim myrow as string

if me.combo1 = type1 then
myrow = "row source for type 1)
else
if me.combo1 = type2 then
myrow = "row source for type 2)
else
myrow = "row source for type 3)
end if
end if

me.combo2.rowsource = myrow

************


Thanks.
 

jdraw

Super Moderator
Staff member
Local time
Today, 04:29
Joined
Jan 23, 2006
Messages
15,408
Hi Guys,

Pls help with the below:

Combo 1: Order type
Combo 2: Customer name

I would like user to choose order type from Combo 1 and in Combo 2 they can choose the Customer groups belong to order type choosen in Combo 1.

I already try this but not work

************

Dim myrow as string

if me.combo1 = type1 then
myrow = "row source for type 1)
else
if me.combo1 = type2 then
myrow = "row source for type 2)
else
myrow = "row source for type 3)
end if
end if

me.combo2.rowsource = myrow

************


Thanks.

I think you're looking for Cascading combo boxes.
Here's a tutorial.
http://www.datapigtechnologies.com/flashfiles/combobox2.html

Here's another: http://www.baldyweb.com/CascadingCombo.htm
 

ntanh72

New member
Local time
Today, 01:29
Joined
Nov 16, 2009
Messages
7
Thanks for your help.
 

Users who are viewing this thread

Top Bottom