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

conditional display of fields in a report 1

Status
Not open for further replies.

BitZero

Programmer
Mar 11, 2008
100
US
I'm working on a report that has columns A, B, C and D. I want to look at the first record in the file used by the report and retrieve several date fields, and then use these dates to determined which of the columns to display. The logic will look something like this:

if condition1 is true then
display column A
display column B
end if

if condition2 is true then
display column C
display column D
end if


If a column is not displayed, then it's heading should not be displayed either.

In what event can I place the logic with the conditions?

How do I cause a column to not display? I'm guessing it has something to do with "visable", but I don't know the exact syntax.

Thanks
 
In the report's design view, click on the Detail bar and bring up the property sheet. Click on the Event tab. You'd put your logic on the OnFormat event. Your column heading is probably a label so Me![labelname].visible = False.
 
fneily

I used the Report On Open event, since the conditional logic just needs to be executed once at the beginning. Thanks for your help - that's exactly what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top