Need help with code for Text Box Value.

T

TheWeave

I am trying to hide a grouping when a Text Box in that group has a value of
1. This is my code:

Private Sub Report_Open(Cancel As Integer)
If Me.Text88 = 1 Then
GroupFooter2.Visible = False
Else
GroupFooter2.Visible = True
End If
End Sub

Thanks for any help on this.
Ron
 
K

Ken Snell MVP

Move the code to the GroupDetail2_Print event. Don't use Report_Open event
for this.
 
K

Ken Snell MVP

What is meant by "the group"? Info in group header? or in group footer? Are
you displaying the group header in all cases? If the answer to the last
question is yes, try moving the code to the GroupHeader2_Print event
procedure. Or you can try putting the code in the Detail_Format event
procedure or in the GroupHeader2_Format event procedure.
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/
 
T

TheWeave

Sorry for the confussion. The group footer was still showing for the first
record. The group header displays in all cases. Moving the code to the
Groupheader2_Print Event procedure solved the problem. Thanks.
Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top