Creating .mde file

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.
 
P

Paul Overway

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top