Mike and Doris Manning
mikedorism at ntelos.net
Mon Apr 14 07:37:10 CDT 2003
You need to set the query up so that it has a Group By clause to combine the many records into one record for that Contract Number. Your report should have a textbox for the Contract Number and then textboxes for all of the checkboxes. Set the Format option for the textboxes associated to the textboxes to True/False and you will get the result you desire. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Terri Jarus Sent: Monday, April 14, 2003 7:57 AM To: accessd at databaseadvisors.com Subject: [AccessD] A97 - One to Many Report I have records with one Contract Number and then several attributes that I want to appear as "checked" check boxes on a report. I have three tables: ContractInfo, Diversity Programs, SubPrograms. ContractInfo is the main table containing ContractNumber. There can be many diversity programs applicable to one ContractNumber and then many SubPrograms applicable to each Diversity Program. For each ContractNumber, I want one report that shows TRUE for all applicable Diversity Program checkboxes and then any applicable subprogram checkboxes. My code for this looks like: Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Select Case DiversityProgID Case 1 Choice = True Case 3 HUB = True Case 4 SpecLatex = True Case 5 Environ = True Case 6 Equip = True End Select Select Case SubProgID Case 1 ChoiceMS = True Case 2 ChoicePH = True Case 3 Tier1 = True Case 4 Tier2 = True Case 5 ckLatex = True Case 6 ckFree = True Case 7 ckNA = True Case 8 ckUnk = True Case 9 ckEnergy = True Case 10 ckMerc = True Case 11 ckWaste = True End Select End Sub The code works except I get more than one record if there is more than one DiversityProgID I'm not sure how to approach this. I hope my explanation makes sense. Thanks for any suggestions. _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com