Can 'Save MDE as' dialogue be opened in code

  • Thread starter Thread starter Guest
  • Start date Start date
Beware: I tested it and I got an error 7087 - "You can make an MDE file out
of the database while running Macro or Visual Basic code".

Since the constant acCmdMakeMDEFile doesn't accept any argument, there is no
way to modify this behaviour. However, the constant exists so it must be
useable somehow???
 
What about

Dim a As Access.Application
Set a = New Access.Application
a.SysCmd 603, "db2.mdb", "db2.mde"
Set a = Nothing

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Van T. Dinh said:
Beware: I tested it and I got an error 7087 - "You can make an MDE file
out
of the database while running Macro or Visual Basic code".

Since the constant acCmdMakeMDEFile doesn't accept any argument, there is
no
way to modify this behaviour. However, the constant exists so it must be
useable somehow???
 
Thanks, Doug.

You code works fine if you run the code from another database different from
the one being used as the source for making MDE.

If the code is run in the source, it executes without errors but it doesn't
create the MDE either.

Terry Wickenden has sample code to use acCmdMakeMDEFile but it has the same
limitation. acCmdCompactDatabase and acCmdRepairDatabase have the same
limitation. The sample code has to use SendKeys also ...
 
Back
Top