J
jervin via AccessMonster.com
Hi,
Whats wrong with my second Code? does not delete the record....
pls help...thanks
Code No 1 (this one is working)
************************
Private Sub Ctl_delete_Click()
On Error GoTo a
If MsgBox("Do you want to DELETE this req ?", vbQuestion + vbYesNo, "Delete
Req?") = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
a:
End Sub
***********************
Code No 2 (this is not working)
******************
Private Sub checkpaassword_Click()
If IsNull(Forms!frmpassIss!Text0.Value) Then
MsgBox "It is not a blank Password...Try again."
Me!Text0.SetFocus
End If
If (Forms!frmpassIss!Text0 <> "vincent") Then
MsgBox "Wrong Password...Try again."
Me!Text0.SetFocus
End If
If (Forms!frmpassIss!Text0 = "vincent") Then
On Error GoTo a
If MsgBox("Do you want to DELETE this req ?", vbQuestion + vbYesNo,
"Delete Req?") = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.Close acForm, "frmpassIss"
End If
a:
End If
End Sub
**********************
Whats wrong with my second Code? does not delete the record....
pls help...thanks
Code No 1 (this one is working)
************************
Private Sub Ctl_delete_Click()
On Error GoTo a
If MsgBox("Do you want to DELETE this req ?", vbQuestion + vbYesNo, "Delete
Req?") = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
a:
End Sub
***********************
Code No 2 (this is not working)
******************
Private Sub checkpaassword_Click()
If IsNull(Forms!frmpassIss!Text0.Value) Then
MsgBox "It is not a blank Password...Try again."
Me!Text0.SetFocus
End If
If (Forms!frmpassIss!Text0 <> "vincent") Then
MsgBox "Wrong Password...Try again."
Me!Text0.SetFocus
End If
If (Forms!frmpassIss!Text0 = "vincent") Then
On Error GoTo a
If MsgBox("Do you want to DELETE this req ?", vbQuestion + vbYesNo,
"Delete Req?") = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.Close acForm, "frmpassIss"
End If
a:
End If
End Sub
**********************