i have made a button in a form (access 2007) for saving a record, the record will be only saved with this button with this command in the buttons onclick event...
Expand|Select|Wrap|Line Numbers
- DoCmd.RunCommand acCmdSaveRecord
Expand|Select|Wrap|Line Numbers
- Dim blnsave As Integer
- blnsave = MsgBox("Are you sure you want to save this record?", vbYesNo + vbQuestion, "Save Confirmation")
- If blnsave = vbYes Then
- DoCmd.RunCommand acCmdSaveRecord
- Else
- Msgbox "Continue working on your record!"
- End If
but now every time i press save and say YES, i get the error ...
Run-time error '3021'
No current record.
what did i do wrong here? can somebody help?