J
Jack
Hi,
I have an Access tabbed form. There is a checkbox in tab5. Now I have a
business rule that if I move from a textbox of tab5 to tab6(tab6 is a
subform) then a MsgBox should prompt if this will affect tab6. If the answer
is yes the focus will be in tab6 after checking the check box in tab5. If the
answer is no then the focus will also be in tab6
However the checkbox should be unchecked.
I have the following code in lost focus of the textbox of tab5. Now when the
focus moves out fo textbox of tab5 I get the msgbox. However when I click no,
the code is not being executed. I am not sure why. I appreciate any help for
resolution of this issue.
CODE:
response = MsgBox("Can cause effect on other process? If Yes consider in
6d.", vbYesNo, "Confirm Yes")
If response = vbYes Then
'Make sure to make the checkbox checked
Check523.Value = True
Me![qry6DPermAction subform].Form.txt6DPermAct1.SetFocus
Else
Debug.Print ("Right Here")
Check523.Value = False
Me![qry6DPermAction subform].Form.txt6DPermAct1.SetFocus
End If
I have an Access tabbed form. There is a checkbox in tab5. Now I have a
business rule that if I move from a textbox of tab5 to tab6(tab6 is a
subform) then a MsgBox should prompt if this will affect tab6. If the answer
is yes the focus will be in tab6 after checking the check box in tab5. If the
answer is no then the focus will also be in tab6
However the checkbox should be unchecked.
I have the following code in lost focus of the textbox of tab5. Now when the
focus moves out fo textbox of tab5 I get the msgbox. However when I click no,
the code is not being executed. I am not sure why. I appreciate any help for
resolution of this issue.
CODE:
response = MsgBox("Can cause effect on other process? If Yes consider in
6d.", vbYesNo, "Confirm Yes")
If response = vbYes Then
'Make sure to make the checkbox checked
Check523.Value = True
Me![qry6DPermAction subform].Form.txt6DPermAct1.SetFocus
Else
Debug.Print ("Right Here")
Check523.Value = False
Me![qry6DPermAction subform].Form.txt6DPermAct1.SetFocus
End If