Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Hide a field on a report

Posted on 2007-03-22
3
Medium Priority
?
954 Views
Last Modified: 2013-11-28
Hi

How can i hide a text box on a report if the value of another text box is specific?

I have tried this on a open statment:

If Me.BagOrKg = "Kg" Then
Me.Overweight.Visible = False
Else
Me.Overweight.Visible = True

I know this is wrong - i'm trying though :)

0
Comment
Question by:d10u4v
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 2000 total points
ID: 18770198
use the Format event of the section the controls are in ... you also need to make sure your control names aere different than the name of the field they are bound to.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.txtBagOrKg.Value = "Kg" Then
    Me.txtOverweight.Visible = False
Else
    Me.txtOverweight.Visible = True
End If
End Sub
0
 

Author Comment

by:d10u4v
ID: 18770216
Well, the the BagOrKg field is on the Report Header and the rest is on the Report Footer?
0
 
LVL 39

Expert Comment

by:stevbe
ID: 18770321
then use the footer's format event
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question