G
Guest
I am using the following code to select which subform appears based on the
type of record displayed (there are three classes of objects in the database,
each with the same core data set and three separate sub-tables of data).
Private Sub Form_Load()
Select Case Me!Class
Case Is = 1
Me!fsubA.Visible = True
Case Is = 2
Me!fsubB.Visible = True
Case Is = 3
Me!fsubC.Visible = True
Case Else
Me!fsubA.Visible = False
Me!fsubB.Visible = False
Me!fsubC.Visible = False
End Select
End Sub
It works very well on a form, but when I try to use the same code on a
report (to show/hide subreports), it doesn't work - telling me that the
database cannot find the field 'Class' referred to in my expression.
The field is definitely included in the record source for the report, and I
even put a text box (txtClass) on the report with Class as the record source,
without success.
What do I need to do?
Thanks,
Scott A
type of record displayed (there are three classes of objects in the database,
each with the same core data set and three separate sub-tables of data).
Private Sub Form_Load()
Select Case Me!Class
Case Is = 1
Me!fsubA.Visible = True
Case Is = 2
Me!fsubB.Visible = True
Case Is = 3
Me!fsubC.Visible = True
Case Else
Me!fsubA.Visible = False
Me!fsubB.Visible = False
Me!fsubC.Visible = False
End Select
End Sub
It works very well on a form, but when I try to use the same code on a
report (to show/hide subreports), it doesn't work - telling me that the
database cannot find the field 'Class' referred to in my expression.
The field is definitely included in the record source for the report, and I
even put a text box (txtClass) on the report with Class as the record source,
without success.
What do I need to do?
Thanks,
Scott A