[AccessD] A97 - One to Many Report

Terri Jarus jarus at amerinet-gpo.com
Mon Apr 14 06:57:09 CDT 2003


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.


More information about the AccessD mailing list