Are you sure the group field is a **Text** field with the
string "01"? I guess you would not see any details if that
were not the case so maybe the problem is the use of the
name Group, which is a reserved word. Try changing the name
of the field to something else and see if that helps.
Your code to set the Visible property needs to set Visible =
True if the group value is "01":
Me.Detail.Visible = (Me.Group = "01")
But this will have the same problem as my suggested code so
I don't see how that can help.
In general, this is a simple issue with no associated
problems so you must have something funny going on.
--
Marsh
MVP [MS Access]
John said:
Thanks Marshall for your help! However, I still get the details when "Group"
not equal to "01".
My original code was:
Private Sub Report_Open(Cancel As Integer)
If Me.Group <> "01" Then
Me.Detail.Visible = False
End If
End Sub
I got an error message saying that "Run-time error '2427': You have entered
an expression that has no value."
I just could figure out why there's no value.