Share via

Make Access Report Column Visible/Invisible based on Condition

Anonymous
2010-07-13T17:51:12+00:00

Wondering if there's a way to make an access report column visible or invisible based on a condition? Thanks

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-07-13T17:59:54+00:00

In the OnFormat event of your report section (like the Detail section) put code similar to the following:

    If Me.CustomerName = "ABC" Then

        Me.FieldtoHideName.Visible = False

    Else

        Me.FieldtoHideName.Visible = True

    End If

Hope this helps.

Was this answer helpful?

7 people found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2010-07-13T18:23:52+00:00

You can use Conditional Formatting; select the textbox in report design view, and choose Format... Conditional Formatting from the menu. There's no explicit visible/invisible option but you can set its forecolor to white if the condition is met.


John W. Vinson/MVP

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2010-07-13T18:03:13+00:00

    You can make a text box invisible pretty easily.  What gets messy is when you want other text boxes to the right to move over so there is no gap in the middle of the columns.  The details depend on the condition and other details in the report's design.

    Was this answer helpful?

    0 comments No comments