T
Taher
Hi there
I have a procedure below which is being triggered when
user hits the command button. It is as below
Private Sub Command149_Click()
On Error GoTo Err_Command149_Click
Dim msg, style, Mycheck, checkcriteria, response,
Mystring, style1
msg = "Did you Approve scorecard!"
style = vbYesNo + vbExclamation
Msg1 = " Did you enter Approvers name!"
Msg2 = "Please enter Approvers name!"
style1 = vbExclamation
style = vbYesNo + vbExclamation
Mycheck = IsNull(checkcriteria)
If Mycheck = False Then
response = MsgBox(msg, style, Title)
End If
If response = vbNo Then
DoCmd.Close
End If
If response = vbYes Then
MsgBox Msg1, style
End If
If response = vbYes Then
DoCmd.Close
End If
'End If
' If response = vbNo Then
' MsgBox Msg2, style1
'GoTo Exit_Command149_Click
'End If
' End If
Exit_Command149_Click:
Exit Sub
Err_Command149_Click:
MsgBox Err.Description
Resume Exit_Command149_Click
End Sub
It works like this
1.when user hits the command button the first screen pops
up, if user hits not it closes
2. if users chooses yes hten another screen pops and ask
yes or no to user
3. if user chooses yes it closes
4. if user chooses no then also it closes. here is the
problem, i dont want it to be closed i want another screen
to pop up, but i am for some reason not able to do that.
I would appreciate if someone could help me with this code.
Thank you.
I have a procedure below which is being triggered when
user hits the command button. It is as below
Private Sub Command149_Click()
On Error GoTo Err_Command149_Click
Dim msg, style, Mycheck, checkcriteria, response,
Mystring, style1
msg = "Did you Approve scorecard!"
style = vbYesNo + vbExclamation
Msg1 = " Did you enter Approvers name!"
Msg2 = "Please enter Approvers name!"
style1 = vbExclamation
style = vbYesNo + vbExclamation
Mycheck = IsNull(checkcriteria)
If Mycheck = False Then
response = MsgBox(msg, style, Title)
End If
If response = vbNo Then
DoCmd.Close
End If
If response = vbYes Then
MsgBox Msg1, style
End If
If response = vbYes Then
DoCmd.Close
End If
'End If
' If response = vbNo Then
' MsgBox Msg2, style1
'GoTo Exit_Command149_Click
'End If
' End If
Exit_Command149_Click:
Exit Sub
Err_Command149_Click:
MsgBox Err.Description
Resume Exit_Command149_Click
End Sub
It works like this
1.when user hits the command button the first screen pops
up, if user hits not it closes
2. if users chooses yes hten another screen pops and ask
yes or no to user
3. if user chooses yes it closes
4. if user chooses no then also it closes. here is the
problem, i dont want it to be closed i want another screen
to pop up, but i am for some reason not able to do that.
I would appreciate if someone could help me with this code.
Thank you.