rusty.hammond at cpiqpc.com
rusty.hammond at cpiqpc.com
Thu May 25 10:33:04 CDT 2006
Hi Bryan, What I've done with this sort of thing in the past is to loop through each selected item in the list box and set a hidden text field (Me.BrokerDealer)to the value of the selected item, then run an append query (qryBrokerPlans) to a temp table. In the query I set the criteria to the hidden text field on the form. The report is based on the temp table that query appends to. You have to be sure to clear the table before starting the procedure. The code is in the on-click property of a command buton. The code to loop through the listbox is as follows: For Each varItem In Me.BrokerFirmList.ItemsSelected Me.BrokerDealer = Me.BrokerFirmList.ItemData(varItem) DoCmd.SetWarnings False DoCmd.OpenQuery "qryBrokerPlans", acViewNormal DoCmd.SetWarnings True Next varItem HTH Rusty -----Original Message----- From: Bryan Carbonnell [mailto:carbonnb at gmail.com] Sent: Thursday, May 25, 2006 10: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 ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. **********************************************************************