Solved

Hide a field on a report

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now