Creating .mde file 
Author Message
 Creating .mde file

Hi

Through code my db creates a 2nd db with limited information from the
original
for distributing to various people.

Instead of creating an mdb file I want this 2nd db to be an mde file.

Using DoCmd.RunCommand acCmdMakeMDEFile just generates an
error telling me to use the menu.

Any ideas how I can do this through code??

Thanks



Thu, 22 Jul 2004 21:03:43 GMT  
 Creating .mde file
     Hello Mick!  My name is Rachel Ceraul.  Thank you for using the
Microsoft Access Newsgroups.  If I understand your issue correctly, you are
looking for a way to create an .mde file through code.  I have included an
article link below that should walk you through a process that will assist
you with this.  If the steps in the article do not work, please respond to
this posting including the steps you are taking and the error message that
you are receiving.
     I hope this helps!  If you have additional questions on this topic,
please reply to this posting.

ACC2000: How to Programmatically Save a Database as an MDE File
http://support.microsoft.com/support/kb/articles/q202/0/39.asp

Regards,
Rachel Ceraul
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.



Sat, 24 Jul 2004 05:17:54 GMT  
 Creating .mde file
Thanks Rachel

For your info I had to remove  the 2nd Sendkeys statement or it left
the make mde dialog box open and unresponsive to any action except
Cancel.

Once done though it works great and is exactly what I needed. Once
again thanks for your help.


Quote:
>      Hello Mick!  My name is Rachel Ceraul.  Thank you for using the
> Microsoft Access Newsgroups.  If I understand your issue correctly, you
are
> looking for a way to create an .mde file through code.  I have included an
> article link below that should walk you through a process that will assist
> you with this.  If the steps in the article do not work, please respond to
> this posting including the steps you are taking and the error message that
> you are receiving.
>      I hope this helps!  If you have additional questions on this topic,
> please reply to this posting.

> ACC2000: How to Programmatically Save a Database as an MDE File
> http://support.microsoft.com/support/kb/articles/q202/0/39.asp

> Regards,
> Rachel Ceraul
> Microsoft Support

> This posting is provided "AS IS" with no warranties, and confers no
rights.



Sun, 25 Jul 2004 04:12:45 GMT  
 Creating .mde file
As you know, SendKeys can be unreliable and dangerous if multiple
applications are running, since it may end up going to the wrong
application or dialog.

Access 97 and 2000 both have an undocumented SysCmd 603 for this,
with sample code below. As of Access 2000, it appears that you
must used automation.

- Steve

   ' SysCmd 603 is an undocumented method to make Mde,
overwriting any existing File, may not work if database is locked
   ' For Access 2000, must call SysCmd 603 using automation,
otherwise it does nothing
   Dim appAccess As Access.Application
   Set appAccess = CreateObject("Access.Application." &
Left$(SysCmd(acSysCmdAccessVer), 1))
   appAccess.Visible = True
   appAccess.SysCmd 603, strDbFile, strMdeFile
   appAccess.Quit
   Set appAccess = Nothing


Quote:
>      Hello Mick!  My name is Rachel Ceraul.  Thank you for
using the
> Microsoft Access Newsgroups.  If I understand your issue
correctly, you are
> looking for a way to create an .mde file through code.  I have
included an
> article link below that should walk you through a process that
will assist
> you with this.  If the steps in the article do not work, please
respond to
> this posting including the steps you are taking and the error
message that
> you are receiving.
>      I hope this helps!  If you have additional questions on
this topic,
> please reply to this posting.

> ACC2000: How to Programmatically Save a Database as an MDE File
> http://support.microsoft.com/support/kb/articles/q202/0/39.asp

> Regards,
> Rachel Ceraul
> Microsoft Support

> This posting is provided "AS IS" with no warranties, and
confers no rights.



Thu, 12 Aug 2004 03:20:27 GMT  
 Creating .mde file
While I agree that SendKeys is not the best approach for coding, I'm puzzled
as to why you'd think an undocumented method is any more reliable or safer.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele



Quote:
> As you know, SendKeys can be unreliable and dangerous if multiple
> applications are running, since it may end up going to the wrong
> application or dialog.

> Access 97 and 2000 both have an undocumented SysCmd 603 for this,
> with sample code below. As of Access 2000, it appears that you
> must used automation.

> - Steve

>    ' SysCmd 603 is an undocumented method to make Mde,
> overwriting any existing File, may not work if database is locked
>    ' For Access 2000, must call SysCmd 603 using automation,
> otherwise it does nothing
>    Dim appAccess As Access.Application
>    Set appAccess = CreateObject("Access.Application." &
> Left$(SysCmd(acSysCmdAccessVer), 1))
>    appAccess.Visible = True
>    appAccess.SysCmd 603, strDbFile, strMdeFile
>    appAccess.Quit
>    Set appAccess = Nothing



> >      Hello Mick!  My name is Rachel Ceraul.  Thank you for
> using the
> > Microsoft Access Newsgroups.  If I understand your issue
> correctly, you are
> > looking for a way to create an .mde file through code.  I have
> included an
> > article link below that should walk you through a process that
> will assist
> > you with this.  If the steps in the article do not work, please
> respond to
> > this posting including the steps you are taking and the error
> message that
> > you are receiving.
> >      I hope this helps!  If you have additional questions on
> this topic,
> > please reply to this posting.

> > ACC2000: How to Programmatically Save a Database as an MDE File
> > http://support.microsoft.com/support/kb/articles/q202/0/39.asp

> > Regards,
> > Rachel Ceraul
> > Microsoft Support

> > This posting is provided "AS IS" with no warranties, and
> confers no rights.



Thu, 12 Aug 2004 10:42:38 GMT  
 Creating .mde file
I tried the SendKeys method early on, when trying to automate my
build process. The build process first compiles the library
databases, then converts the front-end database references from
the uncompiled libraries to the newly-compiled libraries using
automation, then compiles the front-end databases, and finally
resets the front-end references back to uncompiled development
status.

For this build process, the SendKeys method outlined in the
Knowledge Base article did not work consistently for me. Under
automation, the dialog did not always get the right keys and the
compile would fail. On the other hand, the SysCmd 603 approach
has been very stable and has never caused problems. (Naturally, I
do back up all files first as part of the build.)

I do not recall who first mentioned this command (MichKa?), but I
seem to recall it was used by Microsoft in the Access wizards. It
has been cited a number of times in comp.databases.ms-access, and
it has always worked much better than SendKeys for me.

- Steve



Quote:
> While I agree that SendKeys is not the best approach for
coding, I'm puzzled
> as to why you'd think an undocumented method is any more
reliable or safer.

> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele


message

> > As you know, SendKeys can be unreliable and dangerous if
multiple
> > applications are running, since it may end up going to the
wrong
> > application or dialog.

> > Access 97 and 2000 both have an undocumented SysCmd 603 for
this,
> > with sample code below. As of Access 2000, it appears that
you
> > must used automation.

> > - Steve

> >    ' SysCmd 603 is an undocumented method to make Mde,
> > overwriting any existing File, may not work if database is
locked
> >    ' For Access 2000, must call SysCmd 603 using automation,
> > otherwise it does nothing
> >    Dim appAccess As Access.Application
> >    Set appAccess = CreateObject("Access.Application." &
> > Left$(SysCmd(acSysCmdAccessVer), 1))
> >    appAccess.Visible = True
> >    appAccess.SysCmd 603, strDbFile, strMdeFile
> >    appAccess.Quit
> >    Set appAccess = Nothing


message

> > >      Hello Mick!  My name is Rachel Ceraul.  Thank you for
> > using the
> > > Microsoft Access Newsgroups.  If I understand your issue
> > correctly, you are
> > > looking for a way to create an .mde file through code.  I
have
> > included an
> > > article link below that should walk you through a process
that
> > will assist
> > > you with this.  If the steps in the article do not work,
please
> > respond to
> > > this posting including the steps you are taking and the
error
> > message that
> > > you are receiving.
> > >      I hope this helps!  If you have additional questions
on
> > this topic,
> > > please reply to this posting.

> > > ACC2000: How to Programmatically Save a Database as an MDE
File

http://support.microsoft.com/support/kb/articles/q202/0/39.asp

- Show quoted text -

Quote:

> > > Regards,
> > > Rachel Ceraul
> > > Microsoft Support

> > > This posting is provided "AS IS" with no warranties, and
> > confers no rights.



Thu, 12 Aug 2004 15:35:41 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Problem creating MDE file

2. Cannot create MDE file

3. Can not create MDE file in Office 2000-- Please Help!!

4. Access 2000: Create and save add-in/mda and mde files

5. how to create an .MDE file from a utility (library) .MDB

6. Creating an MDE from an MDB file

7. Can I Create an MDE file via code?

8. Can I create an .MDE file through Automation?

9. MDE 2 MDE

10. How do you create .mde?

11. Create MDE from VBA

12. Create MDE with Access 97 / 2002 problem

 

 
Powered by phpBB® Forum Software