In a report, I have a label [Label49]. I need the caption to change according to a text field [FamilyMemberID]. It's a list of family members by their title: Children, Father, Mother, etc. I have tried this code, but it will label all of the labels according to the last entry.
If FamilyMemberID = 1 Then
Reports![rptFamily]!Label49.Caption = " CHILDREN"
ElseIf FamilyMemberID = 2 Then
Reports![rptFamily]!Label49.Caption = " FATHER"
ElseIf FamilyMemberID = 3 Then
Reports![rptFamily]!Label49.Caption = " MOTHER"
ElseIf FamilyMemberID = 4 Then
Reports![rptFamily]!Label49.Caption = " STEP-FATHER"
ElseIf FamilyMemberID = 5 Then
Reports![rptFamily]!Label49.Caption = " STEP-MOTHER"
ElseIf FamilyMemberID = 6 Then
Reports![rptFamily]!Label49.Caption = " FATHER-IN-LAW"
ElseIf FamilyMemberID = 7 Then
Reports![rptFamily]!Label49.Caption = " MOTHER-IN-LAW"
ElseIf FamilyMemberID = 8 Then
Reports![rptFamily]!Label49.Caption = " SIBLINGS"
End If