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

GroupHeadeer Report Problems

Status
Not open for further replies.

EddyLLC

Technical User
Mar 15, 2005
304
US
My report in Access 2003 has a groupheader in it whose fields are empty for some records and not for others. In the OnFormat event of the header I put the following code:

If IsNull(Field1) Then
Me.GroupHeader1.Visible = False
Else

I put the code in hoping to save pages of the report. If the header has no data it won't appear and the data printed below it would move up on the page. The problem, I believe, is the entire report is formatted before printing and thus if line 10 has data in Groupheader1 the first 9 lines Groupheader is not shown but line 10 makes it visible for the entire report thus empty space where GroupHeader1 would be for the first 9 lines.
Finally a question. Does the Groupheader have to appear for every record just because it has data for one record?

Apologizes for the long winded explanation.
 
What happens if you use:
Cancel = IsNull(Me.txtField1])
This assumes you have a text box in the section named txtField1.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top