UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Creating an MDE - From Code?    
 
   
Nwulf
post Feb 18 2004, 04:43 PM
Post #1

UtterAccess Guru
Posts: 814
From: MN



Is it possible to create a MDE from code?

Nick
Go to the top of the page
 
+
TimK
post Feb 18 2004, 11:25 PM
Post #2

UtterAccess VIP
Posts: 6,250
From: Khon Kaen, Thailand



Check this Make MDE File out.

Or you can use SendKeys to help. Something like this.

CODE
Private Sub cmdMakeMDE_Click()
    SendKeys "%TDM"
End Sub


You won't be able to make MDE if the mdb file is in Access 2000 format.

(IMG:http://www.utteraccess.com/forum/style_emoticons/default/smile.gif)
Go to the top of the page
 
+
mishej
post Feb 18 2004, 11:36 PM
Post #3

Retired Moderator
Posts: 11,289
From: Milwaukee, WI



Yes, with the undocumented SysCmd 603:
CODE
  Application.SysCmd 603 "c:\temp\yourMDB.mdb", "c:\temp\youNewMDE.mde"
Go to the top of the page
 
+
Nwulf
post Feb 19 2004, 09:08 AM
Post #4

UtterAccess Guru
Posts: 814
From: MN



Thanks John Mishefske. I think that I will your example...I am NOT going to get involved with any sendkey examples (IMG:http://www.utteraccess.com/forum/style_emoticons/default/smile.gif)

I have created a couple of "emulation" programs where it sends A LOT of information from an Access form to another program. Not fun at all...and that was with A97. I haven't read up on SendKeys with A2003 but I am assuming it is all the same. Is the NumLock bug fixed with the new versions of Access? Just wondering...

Thanks again.

Nick
Go to the top of the page
 
+
Nwulf
post Feb 19 2004, 10:30 AM
Post #5

UtterAccess Guru
Posts: 814
From: MN



John,

When I insert the line you provided, when I compile it, it gives me a syntax error.

Any ideas?

**************************
Found Problem

Afer "603", insert a comma. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/smile.gif) Undocumented (IMG:http://www.utteraccess.com/forum/style_emoticons/default/smile.gif)

Nick

Edited by: Nwulf on 02.19.04.
Go to the top of the page
 
+
Nwulf
post Feb 19 2004, 10:58 AM
Post #6

UtterAccess Guru
Posts: 814
From: MN



Hold on...this is how this command will work:

CODE
Set obj = GetObject("", "access.application.11") 'A2003 is version 11, etc

obj.SysCmd 603, "c:\myFile.MDB", "c:\myFile.MDE"



set obj = nothing


This will do it...worked like a charm! (IMG:style_emoticons/default/smile.gif)

Nick

Edited by: Nwulf on 02.19.04.
Go to the top of the page
 
+
mishej
post Feb 19 2004, 11:26 PM
Post #7

Retired Moderator
Posts: 11,289
From: Milwaukee, WI



Yes, I pulled this from my build application and it does use an Object that points to another instance of Access. It's been awhile since I got this working; glad you could pull it together from my breadcrumbs (IMG:http://www.utteraccess.com/forum/style_emoticons/default/wink.gif) LOL!
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 06:19 AM