Mcgillivray, Don [IT]
Donald.A.McGillivray at sprint.com
Thu May 25 10:38:08 CDT 2006
Bryan, You have to loop thru the items selected in the list box to build the SQL. This ought to get your synapses firing (shooting from the hip and a sometimes faulty memory of the exact property names): Dim varItem as Variant, strSQL as String For each varItem in Me!lstStudents.ItemsSelected strSQL = strSQL & "StudentID = " & Me!lstStudents.ItemData(varItem) & " OR " Next . . . Then trim and pretty up the SQL and pass it to the report, or whatever. Hope this helps . . . Don -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bryan Carbonnell Sent: Thursday, May 25, 2006 8:14 AM To: Access Developers discussion and problem solving Subject: [AccessD] Creating Filter Form for Report I need some help (with Access this time :) because my brain isnt' working well today and I haven't really done any dev in Access for far too long. Here is what I am trying to do: I need to generate a report that will shom me what courses individuals have had. I need to be able to select one or a varyiong number of participants and then have it show me what courses they have had. What I was thinking was have a form that lists the individuals in a multi-select listbox, and then use that as a parameter for the query the report is based on, but I'm having a serious mind gap as to how to get the info from the lsit box to the query. HELP!!! Please??!?! -- Bryan Carbonnell - carbonnb at gmail.com Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "What a great ride!" -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com