tweeter85usn
New member
- Local time
- Today, 13:08
- Joined
- Mar 23, 2012
- Messages
- 6
Good Day My Friends,
I have come across a problem. I'm sure it is something simple and I just can't figure it out or find it on the web. It may be that I am trying to ask the wrong thing. Anyway.
Here is the Code I am using.
*Note: PQS1Issue and PQS2Issue are checkboxes'''
The problem I am having is that when I press no on either PQS1Issue or PQS2Issue, it runs "Undo" on the other one as well. I need to be able to undo the action of which ever I am using at the time and not both. Both are on the same form.
Please let me know if you need more info.
I have come across a problem. I'm sure it is something simple and I just can't figure it out or find it on the web. It may be that I am trying to ask the wrong thing. Anyway.
Here is the Code I am using.
*Note: PQS1Issue and PQS2Issue are checkboxes'''
Code:
Private Function YouSure()
If MsgBox("Clearing this checkbox will clear all information under it.", vbYesNo, "Warning") = vbYes Then
DoCmd.Save
Else
Me.Undo
Me.PQS1Name.Enabled = True
Me.PQS1DateIssued.Enabled = True
Me.PQS1DateDue.Enabled = True
Me.PQS1Name.Undo
Me.PQS1DateIssued.Undo
Me.PQS1DateDue.Undo
End If
End Function
'''''''''''''''''''''''''''''''
Private Function YouSure2()
If MsgBox("Clearing this checkbox will clear all information under it. Are you sure you want to do this?", vbYesNo, "Are You Sure?") = vbYes Then
DoCmd.Save
Else
Me.Undo
Me.PQS2Name.Enabled = True
Me.PQS2DateIssued.Enabled = True
Me.PQS2DateDue.Enabled = True
Me.PQS2Name.Undo
Me.PQS2DateIssued.Undo
Me.PQS2DateDue.Undo
End If
End Function
'''''''''''''''''''''''''''''''''''''
Private Sub PQS1Issued_Click()
If PQS1Issued.Value = 0 Then
Call YouSure
Else
End If
End Sub
Private Sub PQS2Issued_Click()
If PQS2Issued.Value = 0 Then
Call YouSure2
Else
End If
End Sub
The problem I am having is that when I press no on either PQS1Issue or PQS2Issue, it runs "Undo" on the other one as well. I need to be able to undo the action of which ever I am using at the time and not both. Both are on the same form.
Please let me know if you need more info.