Ravi Kumar
Registered User.
- Local time
- Today, 22:55
- Joined
- Aug 22, 2019
- Messages
- 162
I've written a small code to save & new button , but unfortunately it is not working. Someone please help me.
#Private Sub cmdsavenew_Click()
If Me.Dirty = True Then
If MsgBox("Do you want to save the changes for this record?", _
vbYesNo + vbQuestion, "Save Changes?") = vbNo Then
Me.Undo
Else
Me.Dirty = False
DoCmd.Save acForm, "2019"
DoCmd.OpenForm ("2019"), acNormal
End If
End If
End Sub
#Private Sub cmdsavenew_Click()
If Me.Dirty = True Then
If MsgBox("Do you want to save the changes for this record?", _
vbYesNo + vbQuestion, "Save Changes?") = vbNo Then
Me.Undo
Else
Me.Dirty = False
DoCmd.Save acForm, "2019"
DoCmd.OpenForm ("2019"), acNormal
End If
End If
End Sub