473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How can I get multi-selection Combo Box data to display appropriately in a Word Doc

I'm an Access novice so please forgive me for being simplistic with this question. I have an Access database that contains, among many other things, several combo box wherein users are able to select more than one item in a list. I'm trying to setup a mail merge in a Word doc that will pull this data. Every other data point transters to the Word template just fine except for these particular combo boxes. (I did some reading on these forums and found that this seems to be a common problem, but I haven't encountered any solutions that work for me.) What I'm wondering is this: is there a way that I can make Word and Access play nice when it comes to putting these data items into a mail merge? One of the solutions I tried was to put the text into my template and setup checkboxes that could then be linked to the Access data, but that didn't get far. E.g....
Which of the following movies do you own?
[X] Blazing Saddles
[ ] Gone with the Wind
[X] Gremlins II
[ ] Citizen Kane

Any suggestions?
Apr 17 '14 #1
1 2655
zmbd
5,501 Expert Mod 4TB
Ah, as so often happens the multi-select-listbox bytes again... punny
As seen here: http://bytes.com/topic/access/answer...select-listbox (don't bother to follow the links in this thread, they are all long dead; thus, the code they reference is no longer available) you basically need to pass a record set to the word document and that's not what is happening with your document. The control isn't part of any recordset... nor to the best of my knowledge can it be used that way directly.

So in order to do anything with the control, you'll need to understand how a multiselect works and the common methods of retrieving the information out of the control:

ListBox.MultiSelect Property (Access)
Office 2010


One Method to get the selected information

Use a multi-select list box to filter a report - Allen Browne
Mr. Browne most likely has the easiest to follow methods... but I'm a little bias here given the amount of help his site has given me over the years.

From here, we're going to need to either store the query that you will create using the control's values- and then you can open the word document by hand (IMHO the easiest for newer VBA programmers or for those just occational type merges), store the query and then call word to open with the mail merge document that has already been linked to a query with that name, or pass the query via application automation. However, it really depends on your skill set as to the best method to use to get your information out to word.

To give you an example of application automation read thru the following insight article: Application Automation now this does deal with Outlook and Excel; however, word is essentially the same basic principles


SO
Read thru the information
Please attempt one method or the other.
If you get stuck... you should go ahead and repost your efforts to this thread. When you do, please let us know which version of office/access you are using. If you encounter any errors, we will need to know on what line of code the error occurs and Please post the EXACT title, number, and text of the error message. Please do not alter, omit, nor abbreviate the information provided in the error message
Apr 17 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Mike Turco | last post by:
I've inherited a report that is > 100 pages long, most of it is typewritten and doesn't change. The ideal situation would be to insert the data into fields in a word doc. The issue is that this...
2
by: JumpinJeff | last post by:
I have a combo box that displays contact names. The recordsource contains ID and contact names (displayed as 0;1", column count 2, bound column 1). All works well except while changing records...
2
by: ads | last post by:
hi i was given a task to display sql server data in ms word using xml. Im currently doing research to accomplish the task. What i have in mind is to create an xml template (or schema?) to load...
1
by: msiddiqui | last post by:
Hi, I am Mahmood Alam Siddiqui please help me. i am facing some problem for display MS Word file in jsp so please have you any solution for this please send me at "msiddiqui@xavient.com" one...
0
by: nehacredo | last post by:
hi alll.. i wanna display a word file content in a browser..how can i do that..i hav done one coding in that i can display the contents...but with contents some symbols also coming... anyone pls...
2
by: Ang | last post by:
hi all, First how can I make a word doc like this link? http://www.cityu.edu.hk/hro/job_v/appform/appform_adexe.doc And next how to collect the user inputed data in the word by c#? I...
3
by: Mufasa | last post by:
I need to write a windows program in C# that will display a word document on the screen without having Word loaded on the machine. How can I do this? TIA - J.
4
by: kkshansid | last post by:
what is the best way to display a word file on a php page in the same format as it is on word format ? word file has some very well diplay of data in tabular format php page has includes...
1
by: kkshansid | last post by:
is it possible to make access combo box display some value and in enter other for example i want to display balanced and not balanced but enter value 0 for balanced and 1 for not balanced.i added...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.