make .mde file from a remote db

T

The Dude

Hello everyone,

I am using a remote db to copy two versions of the working db. I have an
admin and a regular version of my db - through the application.compactrepair
command.

Now I would like to make .mde files from these two versions. Is there a
command line for that?

Thanks a lot
T_D
 
T

The Dude

Thanks Chris!

It works great :)

Chris O'C via AccessMonster.com said:
There's no command line for that but you could write a vba procedure. The
source db needs to be closed before running the code.

Public Function makeMDE()

On Error GoTo Proc_Err

Dim accApp As New Access.Application

accApp.OpenCurrentDatabase "c:\data\sourcedb.mdb", True
accApp.CommandBars("Tools").Controls("Database Utilities").Controls("Make
MDE File...").accDoDefaultAction
'Get prompted for mde file name
Set accApp = Nothing

Exit Function

Proc_Err:

MsgBox Err.Number & vbCrLf & Err.Description
Err.Clear

End Function


Chris
Microsoft MVP
 

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