Pls help my report !

L

luan

Hi folks !
I have met a trouble on my report!
I use some textbox to control a groupfooter visible or not !
Let see:
Groupheader1
Groupheader2
Groupfooter2
Groupfooter1
In Groupheader2, I add :
Textbox1
- Name : CountRecord
- ControlSource: = Count(*)
- Running sum: No
Textbox2
- Name : Item
- ControlSource: = 1
- Running sum: over group
In GroupFooter2, I have a unbound control
In Groupfooter1, I add a textbox :
- Name : Countgroup
- ControlSource: = [Item]
- Running sum: No

Please see my code:

Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As
Integer)
Me.GroupFooter1.Visible = (Me.Countgroup > 1)
End Sub

Private Sub GroupFooter2_Format(Cancel As Integer, FormatCount As
Integer)
Me.GroupFooter2.Visible = (Me.CountRecord >= 2)
End Sub

The code above works great, but I need Unbound control in GroupFooter2
get the value base on GroupFooter1
If GroupFooter1 = Visible then Unbound control = "Grand Total"
else Unbound control = "Sub Total"

I apply the code on GroupFooter1 but not succeeded !
I get stuck here. I need a hand !
Can anyone teach me how to do this ?
Thanks ur time.
Luan from VietNam
 

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