If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Setting up a report that won't print empty fields
Using Access 2002, I have a report with about 60 fields, and of those 60, I
would like to print just the fields that have data in them. From what I have gathered online, I think I need to use code, but I am self-taught on Access and have not needed to use VBA until now. Could someone help walk me through this? I appreciate any help! Thanks ~Jenni -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200512/1 |
#2
|
|||
|
|||
Setting up a report that won't print empty fields
If you arrange your text boxes on the report so that they do not overlap
each other vertically, you can set the CanShrink property of the text boxes. If there is nothing else on the row, they will shrink, and the space will be freed up. Provided the CanShrink property of the (Detail?) section is Yes as well, no vertical space will be taken up by the shrunk text boxes. Post back if you need further details, e.g. if these boxes have a label beside them that you also need to lose when the field is blank. BTW, if you have 60 fields in your table, and most are blank, there's a fairly good chance that a related table would be a better design for the fields that are repeating. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "jenni via AccessMonster.com" u16268@uwe wrote in message news:582f57f72e0b4@uwe... Using Access 2002, I have a report with about 60 fields, and of those 60, I would like to print just the fields that have data in them. From what I have gathered online, I think I need to use code, but I am self-taught on Access and have not needed to use VBA until now. Could someone help walk me through this? I appreciate any help! Thanks ~Jenni |
#3
|
|||
|
|||
Setting up a report that won't print empty fields
Where is the CanShrink property? I've viewed the properties looking for this,
and I cannot find it anywhere... not even in the help index/search. A little more about this report ... it has 60 fields, but different records will have a different variety of fields with data in them. One record may have data in 10 fields, but another record may have data in 5 of those same 10 fields, but 12 additional fields as well. This database is for quality assurance in medical files, so when things are missing or incomplete, notes are made for the applicable field. But notes will vary for every file. I need to be able to pop out a report for each department's records detailing just the fields that need attention (have data in them). More help is appreciated. Jenni -- Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
Setting up a report that won't print empty fields
Open your report in design view.
Right-click a text box, and choose Properties. On the Format tab of the Properties box, CanShink is about 5 down from the top. Don't forget to check that the section's CanShrink is set as well. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jenni Grubb via AccessMonster.com" u16268@uwe wrote in message news:583004cd7f1af@uwe... Where is the CanShrink property? I've viewed the properties looking for this, and I cannot find it anywhere... not even in the help index/search. A little more about this report ... it has 60 fields, but different records will have a different variety of fields with data in them. One record may have data in 10 fields, but another record may have data in 5 of those same 10 fields, but 12 additional fields as well. This database is for quality assurance in medical files, so when things are missing or incomplete, notes are made for the applicable field. But notes will vary for every file. I need to be able to pop out a report for each department's records detailing just the fields that need attention (have data in them). More help is appreciated. Jenni |
#5
|
|||
|
|||
Setting up a report that won't print empty fields
I found the Can Shrink and made the updates to the section and text boxes,
however, the report looks exactly the same as it did before. Help! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200512/1 |
#6
|
|||
|
|||
Setting up a report that won't print empty fields
Place a text box on a line on its own, with no other labels or controls
beside it, and none overlapping from above or below. Does it shrink now? -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jenni Grubb via AccessMonster.com" u16268@uwe wrote in message news:58304f3156ddf@uwe... I found the Can Shrink and made the updates to the section and text boxes, however, the report looks exactly the same as it did before. Help! |
#7
|
|||
|
|||
Setting up a report that won't print empty fields
Hmmm... It works now, but shouldn't the label be attached? How will I know
what control (field) the data goes to? Is there a way for the label and text box to shrink when there is no data in the texbox, but be visible when there is data? We're getting close! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200512/1 |
#8
|
|||
|
|||
Setting up a report that won't print empty fields
Great: you have it working.
Now for the trick to get the label to show only when the field has data. In report design view, right-click the label, and Change To | Textbox. Set the ControlSource of the text box to: =IIf([Field1] Is Null, Null, "Show this text") Set CanShrink to Yes for this quazi-label also. When Field1 has a value, "Show this text" appears. When Field1 is null, the quazi-label is Null, and so it shrinks also. Make sure the Top of the label is exactly the same as the Top of the text box, and they are exactly the same height. That way they can shrink together. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jenni Grubb via AccessMonster.com" u16268@uwe wrote in message news:5830ca6d3ef19@uwe... Hmmm... It works now, but shouldn't the label be attached? How will I know what control (field) the data goes to? Is there a way for the label and text box to shrink when there is no data in the texbox, but be visible when there is data? We're getting close! |
#9
|
|||
|
|||
Setting up a report that won't print empty fields
Getting close...
I turned the label into a text box and set can shrink to yes... I took your formula and inserted my field name to get the following: =IIf([Consumer Data Sheet] Is Null,Null,"Show this text") but all I get is #name? on the report, and it shows even though there is no data. I followed your directions to a T on a few fields and had the same prob. What did I do wrong? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200512/1 |
#10
|
|||
|
|||
Setting up a report that won't print empty fields
Check the Name property of this text box. It cannot be the same as the name
of any of the fields in the report. An alternative expression would be: =IIf(IsNull([Consumer Data Sheet]), Null, "Whatever text") Presumably Consumer Data Sheet is the name of your text box (with exactly those 2 spaces). -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jenni Grubb via AccessMonster.com" u16268@uwe wrote in message news:583c565c5bee6@uwe... Getting close... I turned the label into a text box and set can shrink to yes... I took your formula and inserted my field name to get the following: =IIf([Consumer Data Sheet] Is Null,Null,"Show this text") but all I get is #name? on the report, and it shows even though there is no data. I followed your directions to a T on a few fields and had the same prob. What did I do wrong? |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Printing Reports Access 2002 Pleas Advise | Dermot | Database Design | 12 | October 5th, 2005 11:23 AM |
how do I not print blank fields in access report? | David | Setting Up & Running Reports | 1 | February 22nd, 2005 03:21 PM |
Still Hoping for help with a Query problem | Don Sealer | Using Forms | 15 | November 13th, 2004 06:24 AM |
How do I print the details view | David | Running & Setting Up Queries | 5 | August 28th, 2004 12:17 AM |
Label | SRIT | General Discussion | 2 | June 22nd, 2004 09:42 PM |