• Error with mde but not mdb (2k)

    Author
    Topic
    #384143

    I have database that runs fine as an mdb. However, everytime I use the Tools>Database Utilities>Make mde file and then run one of the forms (and it only occurs on one specific form) I get the error “The expression On click you entered as the event property produced the following error: The command or action ‘Save’ isn’t available now.
    * The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]
    * There may have been an error evaluating the function, event, or macro.

    The following is the code behind the save control on the form. (This works fine in the mdb with no errors, only get the error in the mde AAAAAAHHHHHH! ! ! ! !)

    Private Sub cmdSaveRecord_Click()
    DoCmd.RunCommand acCmdSave
    Me.AllowEdits = False
    cmdGotoFirstRecord.Enabled = True
    cmdGotoPreviousRecord.Enabled = True
    cmdGotoNextRecord.Enabled = True
    cmdGotoLastRecord.Enabled = True
    cmdAddRecord.Enabled = True
    cmdCloseForm.Enabled = True
    cmdEdit.Enabled = True
    End Sub

    In addition, I have compiled, decompiled and created the mde on two different workstations with the same results.

    Any ideas are greatly appreciated.

    Respectfully,
    kwvh

    Viewing 0 reply threads
    Author
    Replies
    • #657808

      Try DoCmd.RunCommand acCmdSaveRecord instead

      The expression you’re using is trying to save the form object, and you can’t do that in an mde.

      • #657810

        God Bless You! I owe you a lunch.

        • #657813

          laugh It’s a bit of a drive between California and Texas just for a light meal. I’ll settle for a thankyou until the next time I’m in the Lone Star State. grin

          • #657815

            Well, on the other hand, I may be in Santa Clara (Paramount’s Great America) on business. Who knows, I may get there before you get to TX. Regardless, I thank you very much!

            Kwvh

    Viewing 0 reply threads
    Reply To: Error with mde but not mdb (2k)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: