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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conditionally hiding certain fields/controls in report

Status
Not open for further replies.

MontyBurns

Programmer
Oct 3, 2001
99
GB
Hi,

In a form this would be easy for me, but i've not done very much report coding so would really appreciate some help on this.

My report has, for each record, 4 rows of fields in 3 columns. I.e. sort of like a grid containing 12 cells. Each row consists of a Date/Time, a checkbox and a text cell.

If the checkbox field is true, I don't want that row to display. How can I do this? There doesn't seem to be a visibility property I can set.

I'll try and illustrate my layout here, but it might get screwed up by wrapping:

RecID Topic Name Date Complete? PersonName
01 Stuff Paralegal: 1/1/01 Yes Barny
Inputter: 2/2/02 No Burns
Lawyer: 1/5/01 No Smithers
IO: 1/5/01 No Homer


02 More Stuff ....

I would have thought that something like this would work:

If Me!chkComplete = True Then
Me!txtDate.visible = False
Me!chkComplete.visible = False
Me!txtName.visible = False
End If

Any ideas?

Thanks,
Burns
 
What you are doing is correct....there is no design time .visible property but the .visible property is available at runtime.....just put your code in the OnFormat property of the Details section and you should be good....Let us know Programming isn't a profession of choice.
It's a profession of calling...
"Hey Programmer, your application broke again!" [spin]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
 
cheers Rob - worked straight off.

I've heard of certain properties only being available at run time etc, but i've never come across it in practice. When I think about it this has probably come up on many other occasions without me realising it!

Thanks for pointing it out,
Burns
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top