INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Conditionally Supress Footer

Conditionally Supress Footer

(OP)
So trying to conditionally suppress group footers with the following, in the On Format event, but it's still showing all footers:

GroupFooter0.Visible = (txtBrand = "Nike")



Thanks

RE: Conditionally Supress Footer

Where did you place the code you provided?

I would place code in the On Format event of the GroupFooter

CODE --> vba

Cancel = (txtBrand = "Nike") 

Duane
Hook'D on Access
MS Access MVP

RE: Conditionally Supress Footer

(OP)
in the On Format event

RE: Conditionally Supress Footer

(OP)
Tried in the On Fromat event, but the footer is still showing with:

Cancel = (txtBrand = "Nike")

RE: Conditionally Supress Footer

Please post your complete code. Also add debug.print like:

CODE --> vba

Debug.Print "Me.txtBrand: " = Me.txtBrand
Cancel = (Me.txtBrand = "Nike") 

Duane
Hook'D on Access
MS Access MVP

RE: Conditionally Supress Footer

(OP)

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)

Cancel = (txtBrand = "Nike")

End Sub

RE: Conditionally Supress Footer

mtownbound,
  1. What are the results of the debug.print?
  2. Does your code compile?
  3. Do you have a text box named txtBrand?
  4. Is it actually a text box or combo box?
  5. Can you please prefix your control names with "Me."?

Duane
Hook'D on Access
MS Access MVP

RE: Conditionally Supress Footer

(OP)

Not isolated to just this report. Tried this code on several different reports and it isn't working on any of the text boxes (prefixed them all with Me.).

RE: Conditionally Supress Footer

What view are you opening report view or print preview?

I asked a bunch of questions which seem to have been ignored sad.

Duane
Hook'D on Access
MS Access MVP

RE: Conditionally Supress Footer

(OP)
It compiles with no problem; it's actually a text box called txtBrand; prefixed with "Me." Opening with report view.

RE: Conditionally Supress Footer

(OP)
That did it. Thanks!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close