I have a subreport with a source of 2 related tables (linked on the field [type] in a 1 to many relationship)
Fields in the first table (the “1” table) should appear once in the report (in the report header)
All of the related fields in the second table (the “many” table) appear in the detail
All of the fields are in the data source and on the report as a control
The controls related to the first table are in the header section
The controls related to the second table are in the detail section
As such, the code below throws the error “can’t find the field…."
HOWEVER,
If I move all of the controls… into the detail section, everything is possible, except that now the fields form the “1” table appear in front of every record of the “many” table, as I would expect them to but do not want them to….
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
With Me
‘show reference to notes at footer
If .InstallationNotesAtFooterYN = True Then
If Len(Nz(InstallationNotesAtFooterAbout, "")) > 0 Then
.txtInstallationNotesAtFooterDescribed_text = "See additional notes at the end of the schedule about " & _
[InstallationNotesAtFooterAbout] & "."
Else
.txtInstallationNotesAtFooterDescribed_text = "See additional notes at the end of schedule."
End If
.txtInstallationNotesAtFooterDescribed_text.Visible = True
Else
.txtInstallationNotesAtFooterDescribed_text = ""
.txtInstallationNotesAtFooterDescribed_text.Visible = False
End If
' show reference to mounting detail
If [InstallationSeeSketchYN] = True Then
.txtInstallationSeeSketchYN_text.Visible = True
.txtInstallationSeeSketchYN_text = "Refer to fixture mounting detail for additional information"
Else
.txtInstallationSeeSketchYN_text.Visible = False
End If
' note that focusing is required
If [FocusingReqdYN] = True Then
.txtFocusingReqdYN_text.Visible = True
.txtFocusingReqdYN_text = "Focusing is required"
If [FocusingReqd_TDAsupervision] = True Then
.txtFocusingReqdYN_text = .txtFocusingReqdYN_text & "; TDA to supervise labor provided by others."
End If
Else
.txtFocusingReqdYN_text.Visible = False
End If
End With
End Sub
Wandering aimlessly in new territory;
any suggestions will be greatly appreciated with thanks in advance,
Mark