Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    May 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    VBA and Access database

    I'm working with Word 2010, VBA and Access 2010. My VBA queries a table and everything appears to work OK. I've also got all the correct References set in the VBA Editor.

    I now want to give my template and database file to my friend to use. He's got Word 2010 in the Home edition which means he doesn't have Access. So my first question is: does he need Access on his system for my template to work or will it work just having the database file?

    My second question lies with the References I've set in the VBA Editor. When I pass the template to him will his system read the references I've set for my template to work correctly and query the database file? (Yes, I know you could say "Try it and see what happens!" but I'm trying to be a little prepared before the event so I know what I need to look for should it not work as I might expect).

    Thanks for any help you can give me on these points.

    Roderick

  2. #2
    3 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    200
    Thanks
    0
    Thanked 31 Times in 30 Posts
    Roderick,

    Welcome to the world of software development and deployment!

    Building Office based applications to run on other people's machines does require a lot of extra testing and tweaks to the way you code stuff. For instance, using Late Binding helps solve reference issues. You may also have to build in tools to modify paths. When you create stuff for others, it does require more work and lots of testing.


    Quote Originally Posted by RoryOk13 View Post
    I now want to give my template and database file to my friend to use. He's got Word 2010 in the Home edition which means he doesn't have Access. So my first question is: does he need Access on his system for my template to work or will it work just having the database file?
    They may not need Access installed. Without seeing your VBA code it will be hard to say for sure.

    What is the database format for the Access file? Is it a .mdb (JET) or .accdb (ACE)?

    You will need the Access database drivers for the format you are using. The good news is the JET (.mdb) format drivers are already installed with Windows. The ACE (.accdb) drives must be installed. See: Microsoft Access Database Engine 2010 Redistributable (Click Here)

    If it were mine, I would use the .MDB format. It will make the deployment a lot simplier. No extra stuff to install.

    FYI: There is the free Access Runtime available for download from Microsoft. See: What is the Access Runtime Version?

    Without seeing and testing your template it will be hard to say for sure what issues you may have.

    Quote Originally Posted by RoryOk13 View Post
    My second question lies with the References I've set in the VBA Editor. When I pass the template to him will his system read the references I've set for my template to work correctly and query the database file?
    It will depend on your VBA code and the database format.

    There really is no way to know without seeing it and trying it.

    Quote Originally Posted by RoryOk13 View Post
    (Yes, I know you could say "Try it and see what happens!" but I'm trying to be a little prepared before the event so I know what I need to look for should it not work as I might expect).
    Unfortunately that is the only way to be sure. You should be trying it on a different machine during your regular testing if you will every want to deploy it to another PC.

    Testing is a major part of good programming. You will learn a lot more if you will "Try it and see what happens!"

    FWIW: I develop on a Windows 7 Pro 64-bit PC. I have XP-Mode set up and also several other Virtual Machines (VM) just for testing.
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

Tags for this Thread

Posting Permissions

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