I am totally confused by this check box problem that I am facing.
I have a a Main form with a continous subform. I have a check box on the sub form which has on after update following code :
Private Sub BOX_AfterUpdate()
Dim sMsgReturn
sMsgReturn = MsgBox("CLICK YES IF YOU WANT TO SHIFT THE SELECTED CARD AS SPARE AND CLICK NO IF YOU WANT TO TRANSFER TO ANOTHER NODE-Take care as your actions cannot be reversed ", vbYesNoCancel, "Select option yes or no or cancel"
If sMsgReturn = vbYes Then
MsgBox Me![QTY-WKG] & " NOS OF SPARE CARD -- " & Me![CARD NAME] & " TRANSFERRED TO " & Me![CARD NAME], vbOKOnly + vbInformation
DoCmd.RunMacro "macro37"
ElseIf sMsgReturn = vbNo Then
DoCmd.RunMacro "macro39"
Else
Cancel=True
End If
End Sub
My problem is that the vbyesnocancel starts when the check box is made yes to no and also when made no to yes.
Obviously I want the action to startonly when the box is made "True".
I am getting no clues to proceed further.
Any help will be appreciated.
I tried by keeping a button along with check box but I do not know how to prevent the user from clicking more than 1 check box at a time??
I have a a Main form with a continous subform. I have a check box on the sub form which has on after update following code :
Private Sub BOX_AfterUpdate()
Dim sMsgReturn
sMsgReturn = MsgBox("CLICK YES IF YOU WANT TO SHIFT THE SELECTED CARD AS SPARE AND CLICK NO IF YOU WANT TO TRANSFER TO ANOTHER NODE-Take care as your actions cannot be reversed ", vbYesNoCancel, "Select option yes or no or cancel"
If sMsgReturn = vbYes Then
MsgBox Me![QTY-WKG] & " NOS OF SPARE CARD -- " & Me![CARD NAME] & " TRANSFERRED TO " & Me![CARD NAME], vbOKOnly + vbInformation
DoCmd.RunMacro "macro37"
ElseIf sMsgReturn = vbNo Then
DoCmd.RunMacro "macro39"
Else
Cancel=True
End If
End Sub
My problem is that the vbyesnocancel starts when the check box is made yes to no and also when made no to yes.
Obviously I want the action to startonly when the box is made "True".
I am getting no clues to proceed further.
Any help will be appreciated.
I tried by keeping a button along with check box but I do not know how to prevent the user from clicking more than 1 check box at a time??