Combo field based on a combo field

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

Guest

Hello

I'm trying to create a combo field that changes its options based on the value of the another combo field in the same record. Is this possible

Options Tabl
Combo1 Combo
1
1
1
1
2
2
2
2

If I select "1" in combo box 1, I want options A, B, C, or D in combo box 2. If I select "2" in Combo 2, I want E, F, G, or H

I'd appreciate any help i could get on this. I know in Excel I'd use some sort of "thisrow" command string. Can I do this in Access

Thanks
Kyle B
(two days experience, running Access 2002
 
See The Access Web:

http://www.mvps.org/access/forms/frm0028.htm

--

Ken Snell
<MS ACCESS MVP>



Kyle B. said:
Hello!

I'm trying to create a combo field that changes its options based on the
value of the another combo field in the same record. Is this possible?
Options Table
Combo1 Combo2
1 A
1 B
1 C
1 D
2 E
2 F
2 G
2 H

If I select "1" in combo box 1, I want options A, B, C, or D in combo box
2. If I select "2" in Combo 2, I want E, F, G, or H.
I'd appreciate any help i could get on this. I know in Excel I'd use some
sort of "thisrow" command string. Can I do this in Access?
 
Me is shorthand way of referring to the current object (in this case, the
form). ! is the operator that tells ACCESS that the next name is a control.

When you use this syntax, it will use the value of Combo2 for the record
that is currently active.

--

Ken Snell
<MS ACCESS MVP>

Kyle B. said:
Thanks for the response!

In the example code, it refers to a "Me!fieldname" style of naming fields.
Is "Me!" an indicator of "this record"?
So Me!Combo2 is a reference to a specific instance of Combo2 (specifically
the Combo2 in the record i'm working on).
 
Back
Top