none
The command or action 'Save' is not available now. RRS feed

  • Question

  • I developed an application in Access 2016 and tested it in my PC several times and solved any problem in it. Now that I save it as ACCDE format and send it to my customer. The operator encountered a problem in some forms when he click a button for saving the form. The code for the button is:

    Private Sub cmdSave_Click()
        If IsValidData() = False Then
            MsgBox "ÔãÇ ÞÈá ÇÒ ÐÎíÑå ÈÇíÓÊí ÝíáÏåÇí Ñäí ÑÇ Ñ äãÇííÏ.", vbOKOnly + vbCritical + vbMsgBoxRight + vbMsgBoxRtlReading, "äÞÕ ÇØáÇÚÇÊ"
        Else
            DoCmd.RunCommand acCmdSave
            Me.optLocked.Value = True
            Me.lblLocked.Visible = True
            LockControls (True)
        End If
    End Sub

    The error message is:

    I don't know. What is the error and why?

    note that the customer office is 2013.


    Karim Vaziri Regards,

    Sunday, May 22, 2016 7:18 PM

Answers

  • Hi kvaziri,

    It might be that your recordset is not updateable, or even the record might not be Dirty (changed).
    If the code is in the same form as the record being saved, you can replace the call to acCmdSaveRecord with this:
    Me.Dirty = False
    This will save any pending updates to the record.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 23, 2016 9:04 AM
    Moderator

All replies

  • It is a really bad idea to develop in a higher version than your customer will be using. It makes it much more likely that you're using features (even undocumented ones) that are not available in the lower version, and that there are problems with References.

    If this is an option: perform a decompile of the accdb on the customer's computer, open the accdb and save as accde.

    In general this problem occurs when the form is in a state that does not allow saving. In such case the ribbon's Save button will also be grayed out.


    -Tom. Microsoft Access MVP

    Sunday, May 22, 2016 7:29 PM
  • Hi kvaziri,

    It might be that your recordset is not updateable, or even the record might not be Dirty (changed).
    If the code is in the same form as the record being saved, you can replace the call to acCmdSaveRecord with this:
    Me.Dirty = False
    This will save any pending updates to the record.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 23, 2016 9:04 AM
    Moderator