Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Save Record Stopped Working 2

Status
Not open for further replies.

dmon000

Technical User
Sep 9, 2003
79
US
Any ideas why the save command in this procedure would now return the error message "The command or action 'SaveRecord' isn't available now." It used to work fine.

Thanks!!


Private Sub SAVE_NEW_PT_RECORD_Click()
On Error GoTo Save_New_Patient_Record_Err
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.SetWarnings False
DoCmd.Close acForm, "frm ADD NEW PATIENT"
DoCmd.Close acForm, "frm ROSTER DIET ORDERS"
DoCmd.OpenQuery "qry Append from Patient Temp", acViewNormal, acEdit
DoCmd.OpenQuery "qry Delete Patient Temp Record", acViewNormal, acEdit
DoCmd.OpenQuery "qryDeleteMPINumberRecord", acViewNormal, acEdit
DoCmd.OpenForm "frm ROSTER DIET ORDERS", acNormal, "", "", , acNormal

Save_New_Patient_Record_Exit:
Exit Sub

Save_New_Patient_Record_Err:
MsgBox Error$
Resume Save_New_Patient_Record_Exit

End Sub
 
How are ya dmon000 . . .

Try this:
Code:
[blue]   docmd.RunCommand acCmdSaveRecord[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
I'd replace this:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
with this:
Me.Dirty = False

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I use: If Me.Dirty Then Me.Dirty = False
but...receiving the "not available right not" error could mean there is nothing dirty to save.

HTH RuralGuy (RG for short) acXP winXP Pro
Please respond to this forum so all may benefit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top