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
Solved

Hide a field on a report

Posted on 2007-03-22
3
950 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
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

856 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