G
Guest
Hi,
I’ve having trouble with my skip pattern. It seems to work ok for the most
part, but my big problem is that it doesn’t seem to reset itself for the next
subject.
Please see my code below. Basically if the subject is under 18, I want to
skip boxes until “question 1.†If the subject is age 18 and over I want to
continue with the questions.
So, if the subject is under age 18, it skips the correct boxes. For the
next subject the skipped boxes from the previous subject are already blocked
out and if I enter an age over 18, I get an error.
Does it have anything to do when the first box after age, “school†is a
yes/no check box?
Or, do I need some “before update†code?
Thanks so much for any help!!!
___________________________________________
Private Sub age_AfterUpdate()
If Me. age < 18 Then
'set the focus to question1 combo box
Me.quest_1.SetFocus
'disable boxes until question1
Me.school.Enabled = False
Me.school_grade.Enabled = False
Me.work.Enabled = False
Me.work_memo.Enabled = False
Me.home.Enabled = False
Else
'set focus to school box
Me.school.SetFocus
End If
End Sub
I’ve having trouble with my skip pattern. It seems to work ok for the most
part, but my big problem is that it doesn’t seem to reset itself for the next
subject.
Please see my code below. Basically if the subject is under 18, I want to
skip boxes until “question 1.†If the subject is age 18 and over I want to
continue with the questions.
So, if the subject is under age 18, it skips the correct boxes. For the
next subject the skipped boxes from the previous subject are already blocked
out and if I enter an age over 18, I get an error.
Does it have anything to do when the first box after age, “school†is a
yes/no check box?
Or, do I need some “before update†code?
Thanks so much for any help!!!
___________________________________________
Private Sub age_AfterUpdate()
If Me. age < 18 Then
'set the focus to question1 combo box
Me.quest_1.SetFocus
'disable boxes until question1
Me.school.Enabled = False
Me.school_grade.Enabled = False
Me.work.Enabled = False
Me.work_memo.Enabled = False
Me.home.Enabled = False
Else
'set focus to school box
Me.school.SetFocus
End If
End Sub