Solved

Hide a field on a report

Posted on 2007-03-22
3
953 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 500 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

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

636 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