How to make ACCDE with VBA code?

daze

Registered User.
Local time
Today, 14:05
Joined
Aug 5, 2009
Messages
61
Is there a way to progammatically convert ACCDB into ACCDE file format?

Can someone provide a code to do it?
 
THNX, but...

1st link takes me to post reply?! - That's no good.

Next, I already tried this code but it gives me error on "msoAutomationSecurityLow" that object is not recognized...

Any new ideas?
 
I have just been writing this and it works. Be sure you place this in another database and have a copy of the database that you want to convert so you have a back up.

You have to add the file path and database name and then also do the same for the location and file name for the accde database.

Function ConvertToaccDE()
sourcedb = "C:\Users\Trevor G\Documents\sample back.accdb"
targetdb = "C:\Users\Trevor G\Documents\sample back.accde"
Dim accessApplication As Access.Application
Set accessApplication = New Access.Application
With accessApplication
.SysCmd 603, sourcedb, targetdb
End With
'Set accessApplication = Nothing

End Function
 
Thanks...

It didn't make accde - only overwrites accdb without prompt.
I have main accdb on server and want to save accde there also.

Any clue?

P.S. There was no error in process. I just put "ConvertToaccDE" as code on a button.
 
A very stupid, lazy way to automate it in Access 2003, kinda using VBA:-

If MsgBox("Make a new MDE file?", vbYesNo) = vbYes Then
SendKeys "%T"
SendKeys "D"
SendKeys "M"
SendKeys "C:\DB\DB1.mde"
SendKeys "%S"
SendKeys "{ENTER}"
End If

The DB1.mde line is optional (will just use the database name).

Steve
 

Users who are viewing this thread

Back
Top Bottom