Error Code 2046

G

Guest

Hi!

I have a continunous form that opens from the previous form selection.
After the user make a edit on each record which is a check box user will
press "Save" command button to save but I'm getting an error msg below. What
am I doing wrong?

Err.Description "The command or action 'SaveRecord' isn't available now."
Err.Number 2046

Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_cmdSave_Click:
Exit Sub

Err_cmdSave_Click:
MsgBox Err.Description
Resume Exit_cmdSave_Click

End Sub

Thank you!
 
R

RuralGuy

Hi!

I have a continunous form that opens from the previous form selection.
After the user make a edit on each record which is a check box user will
press "Save" command button to save but I'm getting an error msg below. What
am I doing wrong?

Err.Description "The command or action 'SaveRecord' isn't available now."
Err.Number 2046

Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_cmdSave_Click:
Exit Sub

Err_cmdSave_Click:
MsgBox Err.Description
Resume Exit_cmdSave_Click

End Sub

Thank you!
I suspect there is nothing to save. Try a diagnostic MsgBox that shows you the
state of the Dirty property before you attempt to save.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top