C
cymichaelip
Hi, I am new in MS Access. I am using MS Access 2002. I have a main
form which has 10 label (from label1 to lable10), main form also has a
subform which has 10 records. Subform has 2 column (one is Position ID
another one is Status). My problem is when I load the form, All
Labels in the main form will automatic change the color according to
the "status" column on the Subform, just like my example below. Any
idea?
for e.g. - Position ID =1 and the Status = "Open" then the
Label1.backcolor=Red
Position ID =2 and the Status = "Open" then the
Label2.backcolor=Red
Position ID =3 and the Status = "Close" then the
Label3.backcolor=Blue
Position ID =4 and the Status = "Cancelled" then the
Label4.backcolor=Green
.....
Do I need to use for Loop? how? Please teach me. Thanks in advance
Michael
form which has 10 label (from label1 to lable10), main form also has a
subform which has 10 records. Subform has 2 column (one is Position ID
another one is Status). My problem is when I load the form, All
Labels in the main form will automatic change the color according to
the "status" column on the Subform, just like my example below. Any
idea?
for e.g. - Position ID =1 and the Status = "Open" then the
Label1.backcolor=Red
Position ID =2 and the Status = "Open" then the
Label2.backcolor=Red
Position ID =3 and the Status = "Close" then the
Label3.backcolor=Blue
Position ID =4 and the Status = "Cancelled" then the
Label4.backcolor=Green
.....
Do I need to use for Loop? how? Please teach me. Thanks in advance
Michael