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!

Suppress Records

Status
Not open for further replies.

TheMulMan

Programmer
May 19, 2005
6
US
I have a report that is based on a query and the report prints out 1 page for each record. How can I suppress null fields for a record, so that they do not print on the report, and have any subsequent fields move up on the page?


 
Have you set the Can Shrink property of the controls to Yes?
Are there any controls to the left or right of the possibly shrinking controls?

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]
 
I set the Can Shrink property of the controls = Yes and made sure that there aren't any controls to the left or right. I saw your answer to a similar question on the Access Database Reports Newsgroup and tried your suggestions. I also tried setting the field heights to 0.0007", each line top to be 0.0007" below the bottom of the previous line, and each Can Grow = Yes. Nothing seems to work. I have a report that is based on a query and the report prints out 1 page for each record. I am attempting to suppress null fields from printing for any given record, have any subsequent fields move up the page, and remove the corresponding label for a blank field. Even w/o the labels, the blank space is still printed.
 
A label to the left or right will not allow a section to shrink. You can replace the label with an expression in a text box like:
="Your Label Caption " + [YourPossiblyNullField]
This would allow the "caption" text box to shrink also.

Try making the text box's border visible to determine if the control is actually shrinking or not.

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]
 
Duane,
Thanks for your response!!! This does allow the text boxes to shrink. However, when fields are not null, the data shows up twice. Once in the makeshift label and once in the text box itself. This is because I need to have 2 text boxes for each field in the following format:

Question1
Answer to Question1

Question2
Answer to Question2

I could go with one box if I could figure out how to set the text part of the field to bold and place a carriage return (Chr(13)) after the text to have the answer on the next line, but I can't get it to work. As far as I know, (Chr(13)) is a carriage return, but it only return a "box" character in the field. I am also not aware of how to set part of a field to bold.

i.e. ="Question1 "+
(Chr(13))[caseident]

Any advice you can give is greatly appreciated!!!

Jeff
 
You can't easily set part of a text box to bold. You can search for some possible solutions. The makeshift label should not show the answer text if you you set the label size correctly and don't allow it to grow.

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]
 
Duane,
I finally figured it out with bits and pieces of answers from programmers and a little ingenuity!!!

I set the control source for the Question text box to:

=IIf([q1] Is Null, "", "Question Text")

and the control source for the Answer text box to:

[q1]

I then set the Question text box to bold. Lastly, I set all of the fields to Can Shrink and Can Grow, as well as the Detail section to Can Shrink and Can Grow. It works great, and I didn’t have to set the height of the fields to 0” to remove empty space, which from a design standpoint was a nightmare.

Thank you for all of your help!!!

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top