Conversion Mdb to Mde with VBA

J

JPH

Hello,
Is there any way to write a VBA routine which would convert mybase.mdb into
mybase.mde?

Thanks for your help

Rgds
JPH
 
D

Douglas J. Steele

It's undocumented and unsupported (so it may disappear with any service
pack), but try:

SysCmd 603, "C:\TEMP\MYBASE.MDB", "C:\TEMP\MYBASE.MDE"

(replace C:\TEMP\MYBASE.MDB and C:\TEMP\MYBASE.MDE with the correct paths)
 
J

JPH

Hi Doug,
Thanks for your quick support.
I tried it but didn't get any result. (No returned error as well, in fact
the SysCmd returns 0)
I forgot to tell that I am using Access2000 with Windows XP
Should you have any other advice I would appreciate.
Thanks
JP
 
D

Douglas J. Steele

By "didn't get any result", you mean that the file you told it to create
didn't get created?

I'm sure I've heard of that working with Access 2000 under Windows XP.
 
J

JPH

Yes Doug you are right.
I created a database with just a button and the syscmd on the click event
The syscmd gives the address of an other existing and working database in
mdb mode.
that's where nothing happens. No error, but no resulting mde file.
Here under is code as entered:
Dim Result As Variant
Result = SysCmd(603, "c:\process\xx.mdb", "c:\process\xx.mde")

c:\process\xx.mdb is a valid database
Result = 0

Cheers
JP
 
D

Douglas J. Steele

Unfortunately, that's the problem with undocumented features!

Try doing a Google search on Access and 603 and see if you find anything.
 
J

JPH

Doug,
Thanks for your advice, I could find this code which did work

Cheers
JP

Sub TestMde()
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application." &
Left$(SysCmd(acSysCmdAccessVer), 1))
appAccess.Visible = True
appAccess.SysCmd 603, "c:\process\xx.mdb", "c:\process\xx.mde"
appAccess.Quit acQuitSaveNone
Set appAccess = Nothing

End Sub
 

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