Results 1 to 7 of 7

Thread: MDE File (2002)

  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, CA, USA
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MDE File (2002)

    I'm developing an app and want to keep the code and the macros invisible.
    When I read the Help file (quickly) I did not notice any mention if the macros become invisible too.
    Which I have a slew of and don/t have the time to convert them to VBA and organize them as I have to install the beta version tomorrow.
    By the way how do you create an MDE file anyway?
    Frank Hoeffer

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: MDE File (2002)

    Creating an .MDE file will prevent users from viewing forms, reports, data access pages, and modules in design view and from otherwise modifying these objects. However, tables, queries, and macros can be viewed and modifed in design view in an .MDE file. To reliably prevent users from viewing or modifying latter you would have to implement Access security, not a viable option if you're pressed for time & are not familiar with Access security.

    To create .MDE file select "Make .MDE file..." from Tools menu. If using Access 2002 the database you are saving as an .MDE must be in Access 2002, not 2000, format. Once you create .MDE you can hide database window from users by setting Startup options (Tools menu). Uncheck Display Database Window and Use Access Special Keys options. You would need a startup or switchboard form to display when DB opens. You would also need a custom menu/toolbar so you can disable built-in ones or users will be able to circumvent attempts to hide database objects. Also be advised that a knowledgeable user can circumvent Startup options by opening database with shift key.

    When you have time to do so, recommend convert all macros to VBA. Source code in an .MDE file cannot be viewed or edited by any user.

    HTH

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, CA, USA
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MDE File (2002)

    Thanks Mark,
    You have helped me greatly!
    I'm saving my work in 2000 format now.
    Can I save in 2000 MDE format as my client has MS2000?
    Frank

  4. #4
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: MDE File (2002)

    Do you mean if your client is using Access 2000 (A2K)? In Access 2002 (aka AXP), if the.MDB file you have open is saved in A2K format, the "Make .MDE File..." on Tools menu will be greyed out (disabled). You would have to convert the .MDB to Access 2002 file format to create an .MDE in Access 2002. The resulting .MDE file will be in Access 2002 format, and will not be usable by users still running A2K.

    What you would have to do is, save .MDB in A2K file format and open copy in Access 2K, not AXP. Then create .MDE in A2K so other A2K users will be able to open file. I use AXP at home and A2K at work & so far have had no problems working on program in AXP (in 2000 format) at home & then taking same file to work and running in A2K. While regular .MDB files can usually be converted to an earlier (or later) version of Access, this has never applied to .MDE files - they cannot be converted to a different version of Access. Hopefully you would still have a running copy of A2K to accomplish this.

    HTH

  5. #5
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, CA, USA
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MDE File (2002)

    Great I will have to do it on my other computer as it has 2000 on it.
    How do you make all the macros convert to VBA.
    I think I saw a command in 97 that does it.
    Frank

  6. #6
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: MDE File & Converting Macros (2002)

    To convert macro to VBA code, open macro in design view and select Save As from File menu. When Save As dialog opens select Module from "As" box, as illustrated. Then Convert Macro dialog will open, check options to Add Error Handling and include Comments in the converted macro. Click Convert button and a new code module will be created, named something like "Converted Macro- (Name of Macro)". Open module and each action in macro will be saved as a separate function. Note that the converted macro code may need some work, but at least the conversion process will help get you started and save you some effort.

    You can also convert Form or Report macros to VBA. Open form or report in design view. Select Macro from Tools menu, then select Convert Form's Macros To Visual Basic (or Report's Macros if report). Note in this case, the conversion does not result in a new code module; the converted macro code will appear in the form or report's code module. For example, a macro assigned to a command button's OnClick property will be converted to an event procedure.

    For some additional info & caveats see these MSKB articles:

    ACC2000: How to Convert Macros to Visual Basic for Applications Code

    ACC2000: Compile Error After Converting Form Macros to VBA

    ACC2000: Conversion of Macro to Visual Basic Code Uses Unexpected Syntax with Form References

    ACC2000: Syntax Error When You Convert a Macro to Visual Basic for Applications Code

    HTH
    Attached Images Attached Images

  7. #7
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, CA, USA
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MDE File & Converting Macros (2002)

    Thanks alot.
    That did it.
    Frank Hoeffer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •