Creating .mde file

  • Thread starter Thread starter Shreenivas Potnis
  • Start date Start date
S

Shreenivas Potnis

Is there any alternative to
"DoCmd.RunCommand acCmdMakeMDEFile"
for creating an mde file.
Above statement opens the dialogue box. However the
requirement is to create a mde file from mdb file non-
interactively.

The application is a vba application in which acess
application object is created.
 
It is an undocumented feature, however, SysCmd 603 [MDBNameIn], [MDENameOut]
will do what you want.

'Example code

Dim x as Object
Dim strFileIn As String
Dim strFileOut As string

On error resume next

strFileIn = "C:\test.mdb"
strFileOut = "C:\test.mde"

Kill strFileOut

Set x = CreateObject("Access.Application")

x.SysCmd 603 strFileIn, strFileOut
 
Back
Top