McGillivray, Don [IT]
Donald.A.McGillivray at sprint.com
Mon May 21 12:09:01 CDT 2007
Chester, The problem is that a list box might have multiple selections made, depending on the multi-select mode that is specified for the control. So you can't just refer to the control, you have to tell it which item(s) in the list on the control you want. One way to do this is to loop thru the ItemsSelected for the list box: Dim varItem as Variant For Each varItem in Me!MyListBox.ItemsSelected '(. . . Your Code Here . . .) 'Use Me!MyListBox.ItemData(varItem) to retrieve the value in the bound column of the list box. 'Use Me!MyListBox.Column(ColumnIndex, varItem) to retrieve values from other columns Next Hope this helps. Don -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Monday, May 21, 2007 8:09 AM To: Access Developers discussion and problem solving Subject: [AccessD] List Box Selection on a Report I have form with a list box on it. When the user clicks on a selection, an on click event runs that opens a report based on the selection. This works fine. Now I need to display the list box selection in a text box on the report. I set the text box control source to =Forms]![Form1]![ManifoldList]. This just returns Name? What might I be doing wrong? Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com