Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a group footer invisible based on condition

Status
Not open for further replies.

VASunGrede77

Technical User
Jun 18, 2012
8
0
0
US
All -
Currently have groupfooter5 .... need this to be invisible if me.codename="Invoice"....

Tried....
If Me.CodeName = "Invoice" Then
Me.GroupFooter5.Visible = False
Else
Me.GroupFooter5.Visible = True
End If

However it is not working...

Essentially, groupfooter5 is a subtotal for months, but it is not needed for items that are "invoices", only needed for items that are "receivers"

Any advice is greatly appreciated.

Thanks in advance!
 
First your code should be on the On Format event of group footer 5. Secondly and I needed a refresher myeslf, the on format even does not fire in report view only in print preview or when printing (as to why we needed report view and it be the defualt to switch to in design view, I have no idea).
 
Please use TGML for your code block formatting. It's as easy as selecting your code and clicking a button ;-)

Where is your code running? I would place the code in the On Format event of the section (groupfooter5) and make sure there was a control [txtCodeName] in the section.

Code:
Cancel = (Me.txtCodeName = "Invoice")


Duane
Hook'D on Access
MS Access MVP
 
Thankd dhookom! Worked like a charm! Makes the report smaller and easier to understand.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top