473,320 Members | 1,946 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,320 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 2648
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.