Forgive me if this has been discussed before...my quick search turned up nothing.
What I would like to do is have the value of several controls be filled in based on the value of another (let's say gateway) control. I have done this before, but only when the value of the gateway control did not matter. In this case, I only want the value of the multiple controls that need filling in to be identical to the gateway control under particular circumstances.
Thus far, here is the code I have written on the gateway control for another purpose:
Private Sub Combo20_AfterUpdate()
If Me.Combo20 = 1 Then
DoCmd.GoToControl "combo24"
Else
DoCmd.GoToControl "combo57"
'if yes to any alzheimers in family answer questions about specific family members,
'else jump to next category of questions
End If
End Sub
Can I also add some code to the AfterUpdate event to specify that iff Me.Combo20= 2 then several other combo responses should equal 2?? I tried accomplishing this in a macro a couple weeks back but somehow that managed to lock up my form. I am hoping to accomplish this in code only, and be able to keep the existing code pasted above (or at least a modified version that accomplishes the same task).
Your assistance will be appreciated!
E.
What I would like to do is have the value of several controls be filled in based on the value of another (let's say gateway) control. I have done this before, but only when the value of the gateway control did not matter. In this case, I only want the value of the multiple controls that need filling in to be identical to the gateway control under particular circumstances.
Thus far, here is the code I have written on the gateway control for another purpose:
Private Sub Combo20_AfterUpdate()
If Me.Combo20 = 1 Then
DoCmd.GoToControl "combo24"
Else
DoCmd.GoToControl "combo57"
'if yes to any alzheimers in family answer questions about specific family members,
'else jump to next category of questions
End If
End Sub
Can I also add some code to the AfterUpdate event to specify that iff Me.Combo20= 2 then several other combo responses should equal 2?? I tried accomplishing this in a macro a couple weeks back but somehow that managed to lock up my form. I am hoping to accomplish this in code only, and be able to keep the existing code pasted above (or at least a modified version that accomplishes the same task).
Your assistance will be appreciated!
E.
