Form acts unexpectedly in MDE fine in MDB

dynamictiger

Registered User.
Local time
Today, 14:30
Joined
Feb 3, 2002
Messages
270
I have a series of forms for collecting data.

Each form builds on previous data entered. This all works fine in MDB format.

When I convert to MDE and update form 2 with new data I get an error message that Save is not available right now.

This is the code:

If Me.Dirty Then

DoCmd.RunCommand acCmdSave

End If

I then run some more code in another module to open the next form.

Why does this work fine in runtime MDB but gives an error in MDE?
 
DoCmd.RunCommand acCmdSave - saves the active object which in this case would be the form. Obviously an impossibility with an .mde.

DoCmd.RunCommand acCmdSaveRecord - saves the current record which is I think what you are trying to do.

The code is not now, nor has it ever done what you thought it was doing. Your data is actually being saved automatically by Access when you move to the next record or close the current form. So, you could even remove the if and save code entirely and your data would still continue to be saved for you by Access.
 

Users who are viewing this thread

Back
Top Bottom