473,320 Members | 2,071 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.

combo to list box

Currently i have a combo box that lets a user select a persons name and print a mailing label for it. I now need to be able to select multiple names and print labels for them. I tried changeing the combo box to a list box with a simple multi select, but when i push the button for the report it is telling me there are no labels for mailing (meaning it is not registering any data). the label report is linked to the form, meaning the memberid from the form is the criteria for the report. what do i need to do to make this possible. is it true that a multiselect box wont work for this...and if it is true, how can i accomplish it?

many thanks
caleb
Aug 21 '06 #1
1 1730
MMcCarthy
14,534 Expert Mod 8TB
You need to use a For Each statement to run through the selections in the listbox.

Dim iSelect as Variant

For Each iSelect In Me.Listxxx.ItemsSelected
'Your code here
'Remember the memberid value of each selection will be referred to
'as Me.Listxxx.ItemData(iSelect)
'Example
Docmd.OpenReport "MailingLabel", , , "[MemberID]=" & Me.Listxxx.ItemData(iSelect)
Next iSelect

Currently i have a combo box that lets a user select a persons name and print a mailing label for it. I now need to be able to select multiple names and print labels for them. I tried changeing the combo box to a list box with a simple multi select, but when i push the button for the report it is telling me there are no labels for mailing (meaning it is not registering any data). the label report is linked to the form, meaning the memberid from the form is the criteria for the report. what do i need to do to make this possible. is it true that a multiselect box wont work for this...and if it is true, how can i accomplish it?

many thanks
caleb
Aug 21 '06 #2

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

Similar topics

3
by: mal | last post by:
Sorry for repost - system added to another subject for some reason Have tried numerous ideas from the group to solve this one. It is such a simple example that it should be straightforward ! I...
2
by: Robert | last post by:
Am using a nested continuous bound subform to add multiple records to the underlying table. One of the fields is based on a limit to list combo box. Any suggestions on best way to progressively...
2
by: kiranmn75 | last post by:
I want to dynamically populate a combo box through javascript. Data is coming from a array. Sometimes data list may contain items in excess of 2000. Explorer takes more than 5 seconds to...
8
by: AA Arens | last post by:
Hi I do have a products table and products-parts table in my Access 2003 database and log all services into a form. I do have at least the following two combo boxes on my form: - Choose...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
0
by: Dawnyy | last post by:
I have a form which is bound to a dataset. I am filling the forms dataset on Form_Load event. On my form I have combo boxes which I am setting by running a stored procedure to return a datatable,...
3
kcdoell
by: kcdoell | last post by:
I have 5 cascading combo boxes on a form. Below is a sample of my vb in the first combo box: Private Sub CboDivision_AfterUpdate() 'When the Division is selected, the appropriate Segment...
30
ADezii
by: ADezii | last post by:
This week’s Tip of the Week will clearly demonstrate how you can dynamically set the Drop Down List Width of a Combo Box to the length of the longest item in its Row Source. The inspiration for this...
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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...
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)...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.