Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report hiding fields

Status
Not open for further replies.

clientuser

Programmer
Apr 18, 2001
296
US
I have a report that has 3 fields that hold number data and these fields are in the detail section of a report..

Its been a while since I messed with Access so I need to know how fields can be hidden if they pull back a certain value.. In this case, if the value is 0 then I would like to hide that field......

I tried:

=IIf([TimeDif]=0,[TimeDif].[Visible]=False,[TimeDif].[Visible]=True)

but im not sure if the IIF can handle visible properties?

I also couldnt get any properties when I went to the detail section code to put things in to check.....

Any suggestions?
 
clientuser
Have you tried putting code on the Format event for the Detail section?

Something like...
If Me.TimeDif = 0 Then
Me.TimeDif.Visible = False
Else: Me.TimeDif.Visible = True
End If

Tom
 
Yeah I tried several different ways, my question is because intellisense doesnt show me the option for .visible, doesnt that mean the property is not available?
 
You can't set any property inside an IIf, you'd have to go to code. THWatson specifically laid it out--go to the "Detail_Format()" event, and basically cut/paste his code. That should work; I've used similar code.

And yes, the .Visible property should appear in Intellisense, but no, Intellisense doesn't always work 100%.


If you're running a newer version of Access, check your textbox properties to see if a 'conditional formatting' thing exists.


Do you just want a blank spot, or do you want this entire record to be skipped? The above will do a blank spot, to skip a record, there's...something else you do. Search google for it.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top