Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2007
    Location
    Massachusetts, USA
    Posts
    249
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hello,

    I am using MS Office 2003 and am trying to attach a drop down field in MS Word to a record in an Access 2003 database?

    The drop down Form Field options contains a "Run Macro on ENTRY and EXIT, so I guess this is where I would attach a Macro that selects the appropriate record.

    Is this the right approach to take in MS Word 2003?

    My end goal is to have a protected MS Word template where the user can select alpha, numeric or alphanumeric characters from various drop down menus in this MS Word (protected) template?

    Thanks in advance for any assistance provided.

    Regards,

    Jim

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by jamesm067 View Post
    I am using MS Office 2003 and am trying to attach a drop down field in MS Word to a record in an Access 2003 database?
    Is the idea to give the user a convenient lookup to conduct a single search and then use code to populate a number of fields? In that case, I think the more common approach would be to use a VBA UserForm to communicate the results of the Access query and let the user select the correct record. You could initiate the process from a drop-down or a button, but if for allowing the user to interact with a list, a UserForm offers much more flexibility than a form control.

    Maybe your document needs to perform multiple searches? I'm not really sure from your description of several different drop-down controls.

  4. #3
    3 Star Lounger
    Join Date
    Jan 2007
    Location
    Massachusetts, USA
    Posts
    249
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi Jefferson,

    Thanks for the reply. Yes, I seem to be having NO success with the Drop Down Form Field (Drop Down List) option in MS Word 2003.

    It sounds like VBA UserForms are the way to go. Overall, I need to have the end user select from various drop down menus on the MS Word template and then click OK or DONE to make it stick.

    The MS Word template will be attached to an XML schema and to the Microsoft Access file. After the user has selected all of the various entries on this 2-4 page template (or form), then they simply save the document and give it to me.

    Are there any samples out there that you could point me to - even a quick and simple example of MS Word and MS Access interacting via the VBA UserForm, would be very helpful.

    Thanks for your time and assistance.

    Regards,

    Jim

  5. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,510
    Thanks
    3
    Thanked 143 Times in 136 Posts
    The best sample code I have seen for this type of request was on Helen Feddema's website. Despite the fact that this has code that is over 10 years old, you will learn a massive amount by looking at these samples.

    Start with Item 25 "Filling a listbox on a Word UserForm with data from Access" on this page http://www.helenfeddema.com/CodeSamples.htm
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #5
    3 Star Lounger
    Join Date
    Jan 2007
    Location
    Massachusetts, USA
    Posts
    249
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hello Andrew,

    Thank you very much for this incredible link. I have been Googling for a bit today and never came across this link.

    It looks like a treasure trove of good stuff.

    All the best!

    Jim

Posting Permissions

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