|
||||||
|
|
Can Grow, Shrink By Richard Rost Can Grow & Can Shrink Properties in Reports In this video, I'll teach you how to use the Can Grow and Can Shrink properties in Microsoft Access Reports so that you can eliminate empty vertical space in a customer report if there are no notes specified on that record. Corinne from Rome, Italy (a Platinum Member) asks: I have a simple customer report. I want to see First Name, Last Name, and Notes. If there are Notes, I want them to all display. That works fine. If there are NO Notes, I want the report to resize so there isn't as much wasted space. How can I do this? MembersMembers will learn how to display the "Notes" label next to the Notes field, but hide it if there are no Notes. We will also learn how to display an image (picture) if one exists, but hide it if there isn't one.
Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the files from class plus get access to the Code Vault. If you're not a member, Join Today!
Links
Keywordsmicrosoft access, ms access, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #instruction, #learn, #lesson, #training, #database, can grow, can shrink, cangrow, canshrink, can grow can shrink access report, access can shrink not working, resize text box, resize control, go home, can shrink images, can shrink image control, can shrink pictures, resize images, visible, report section height, height property
IntroIn this video, I will show you how to use the Can Grow and Can Shrink properties in Microsoft Access Reports to automatically adjust the size of fields and sections based on the data they contain. We will create a simple customer report that displays notes when available and eliminates wasted space when notes are missing. You will learn how to properly set up these properties for both text boxes and sections, avoid common pitfalls with labels, and ensure your reports look clean and professional.TranscriptWelcome to another TechHelp video brought to you by AccessLearningZone.com. I am your instructor, Richard Rost.In today's video, I'm going to show you how to use the Can Grow and Can Shrink properties in your Microsoft Access Reports. We will build a simple customer report, and if there are notes for that customer, then we will show them. If there are not notes, we will hide them and then shrink up that extra space so you do not waste space for each of your records. This question comes from Corinne from Rome, Italy, one of my platinum members. Corinne says: "I have a simple customer report. I want to see first name, last name, and notes. If there are notes, I want them to all display. That works fine. If there are no notes, I want the report to resize so there is not as much wasted space. How can I do this?" Well, Corinne, in order to do this, we have to learn something called the Can Grow and Can Shrink properties, which are part of Microsoft Access Reports and Fields. Can Grow and Can Shrink set whether the specified control automatically adjusts vertically to print or preview all the data that the control contains. Let me show you how to set that up. Here we have my TechHelp free template. This is a free download from my website. You can go grab a copy if you want to. I will put a link down below. In here, I have your basic customer table set up. Here is first name, last name, and there are some notes over here. There is the notes field. If you look at the customer form, there it is. Let's make this a little bit bigger. Let's put some more stuff in here. Super cool. Guy, Star Trek nerd. I am just going to copy and paste this. Copy, paste, paste, paste, paste. Now there is a whole bunch of stuff in the notes field for me. Close that. Let's create a quick customer report. I will click on customer T, create, report design. I work from scratch. I do not like using the wizard to be honest with you. The only wizard I really like is the label wizard because it formats it all for you. As far as regular stuff goes, I prefer working from design view. Double click here to bring up the report properties. Go to All, change the record source to customer T. That is the table that we are binding the report to. It is going to get its data from there. Now that we have done that, I can go to Add Existing Fields and pick the fields I want in this report. Just do first name. I am going to hold down control, click on last name, and also notes. That is all we want in this report. Hold down the control key to pick specific fields out of here. Click, drag, drop, right there. Then I will just move these guys up and to the left a little bit. Let's grab the bottom of the detail section and drag it up to get rid of all this empty, wasted space in here. Just like that. Looks good. Save this as my customer report. Customer R. I will hit OK. We will close that and let's take a look at it. Right click, print preview. There it is. You can see right here, this box with all those notes in it. That got nice and big. The Can Grow property is on. That is the default. Can Grow is on. Same thing for the section that it is in. Scroll down a little bit. You can see that one takes up one line for "kicks butt." Right here, the notes section in this one has no notes, that field is not even there. You cannot even see the outline. Normally I turn these outlines off, but I am leaving them on for this video to show you where this stuff is. Notes is sitting right there. Why is that? I will show you in a second. Let's go into design view. Let's take a look at the properties for this text box. Over to Format. This actually works better if you sort this A to Z so you can see them in order. Let's find Can Grow and Can Shrink, right there. Yes and yes. So by default, text boxes can get as large as they need to be or as small as they need to be. If there is no data, it will shrink right up. The problem is this guy is a label. Labels do not even have a Can Grow or Can Shrink property. If there is anything horizontally on the same line as that text box, it is going to prevent the space from shrinking. You cannot have a label there. Delete that label, which is probably okay anyway. Most of the time you do not have to show off that that is notes. People will get it. That is the first thing you have to do. Let's see what we have now. Let's save this. Let's go into print preview mode again. It is good, but there is still that wasted space there. What is going on? Let's go back into design view. In addition to the fields themselves, the section also has a Can Grow and Can Shrink property. By default, Can Shrink is set to No. You have to come in here and set that to Yes. You have to remember that. I have been asked this question a billion times since I started teaching Access. You get rid of any labels and you have to set Can Shrink for the section equal to Yes. Now if I save it and go to print preview, there we go. Now you can see that extra space is now gone. Hopefully that should answer your question, Corinne. You have to basically have no labels or other fields horizontally with that notes field. You have to make sure that Can Shrink is turned on for the detail section. To learn more about Can Grow and Can Shrink, what if you want to leave that notes label there? I will show you how to hide it. What if you have images in your reports? I will show you how to hide those too and shrink up that extra space if there is no image. I covered this in the extended cut for members. Silver members and up get access to all of my extended cut videos. I also cover a lot more with Can Grow and Can Shrink in my Access Beginner Level 9 class. This includes Can Grow, Can Shrink, page headers, page footers, concatenation, explicit query parameters, and all kinds of different stuff. That is Access Beginner Level 9. How do you become a member? Click the Join button below the video. After you click the Join button, you will see a list of all the different types of membership levels that are available. Silver members and up will get access to all of the extended cut TechHelp videos, live video and chat sessions, and more. Silver members get access to a download folder containing all the sample databases that I build in my TechHelp videos, plus my Code Vault where I keep tons of different functions that I use. Platinum members get all the previous perks plus access to my full beginner courses and some of my expert courses. These are the full length courses found on my website and not just for Access. I also teach Word, Excel, Visual Basic, ASP, and lots more. Do not worry, these free TechHelp videos are going to keep coming. As long as you keep watching them, I will keep making more. If you liked this video, please give me a thumbs up and feel free to post any comments that you have. I do read them all. Make sure you subscribe to my channel, which is completely free, and click the bell icon and select All to receive notifications when new videos are posted. Click on the Show More link below the video to find additional resources and links. You will see a list of other videos, additional information related to the current topic, free lessons, and lots more. YouTube no longer sends out email notifications when new videos are posted, so if you would like to get an email every time I post a new video, click on the link to join my mailing list. If you have not yet tried my free Access Level 1 course, check it out now. It covers all the basics of building databases with Access. It is over three hours long. You can find it on my website or on my YouTube channel. If you like Level 1, Level 2 is just one dollar, and it is also free for all members of my YouTube channel at any level. Want to have your question answered in a video just like this one? Visit my TechHelp page and you can send me your question there. Click here to watch my free Access Beginner Level 1 course, more of my TechHelp videos, or to subscribe to my channel. Thanks for watching this video from AccessLearningZone.com. QuizQ1. What do the Can Grow and Can Shrink properties control in Microsoft Access Reports?A. Whether a control adjusts vertically to show or hide data as needed B. The color of database fields C. The font size of report labels D. Whether data can be exported from the report Q2. Why might extra blank space appear in a report when a notes field is empty? A. Because Can Grow is turned off B. Because the section's Can Shrink property is set to No C. Because the field is not included in the report D. Because there are too many records showing Q3. What must you do if you want the report to shrink up extra space for empty notes fields? A. Delete any labels next to the notes field and set the detail section's Can Shrink property to Yes B. Add a border to the notes field C. Use the report wizard instead of design view D. Set Can Grow to No for the notes field Q4. What is the default setting for the Can Grow property on text boxes in Access reports? A. Off B. Hidden C. Disabled D. On Q5. Which type of control does NOT have Can Grow or Can Shrink properties in Access reports? A. Text Box B. Combo Box C. Label D. Image Q6. What will prevent the detail section from shrinking up when a field such as notes is empty? A. Leaving a label or other control horizontally aligned with the text box B. Setting Can Shrink to Yes C. Including only the notes field in the section D. Using the report wizard Q7. What should you do if you want to display a label only when there are notes present? A. Hide the label when notes are empty B. Set Can Shrink to No C. Change the label to a combo box D. Delete the notes field Q8. In order to bind a report to data in Access, what must you set in the report's properties? A. Record Source B. Control Source C. Data Format D. Field Size Q9. Where can you access the Can Grow and Can Shrink properties for both controls and sections in the report? A. Format tab in the properties window B. Data tab in the table view C. Home tab on the ribbon D. File menu settings Q10. Why does Richard recommend working from Design View instead of using the Access report wizard? A. It provides more control and flexibility over report layout B. The wizard is required for advanced features C. Design View is faster for beginners D. The wizard cannot create labels Answers: 1-A; 2-B; 3-A; 4-D; 5-C; 6-A; 7-A; 8-A; 9-A; 10-A DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks. SummaryToday's video from Access Learning Zone focuses on how to use the Can Grow and Can Shrink properties in Microsoft Access Reports. I will walk you through building a simple customer report where, if customer notes exist, they are displayed and, if not, the space is automatically reduced so that no extra room is wasted for each record.This topic comes from a question about how to display fields like first name, last name, and notes in a report. If the notes field has data, all the notes should show. If not, the report should compress that space so it does not leave empty gaps. This is a common challenge and the solution revolves around understanding the Can Grow and Can Shrink properties available in Access. These two properties determine if a control, such as a text box or a report section, can automatically expand or contract vertically depending on whether there is data to display. This ensures that you do not end up with blank space on your reports for records that do not have, for example, notes entered. To demonstrate this, I started with the free TechHelp template, which is available for download from my website. The customer table includes all the needed fields: first name, last name, and notes. I then showed an example by adding a large amount of text to the notes field for a record to see how Access manages a text box with a lot of data. Next, I created a customer report from scratch using report design view, which allows more control than the Report Wizard. I set the report's record source to the customer table and then added the fields I wanted: first name, last name, and notes. After organizing the layout and removing excess space from the detail section, I saved the report and switched to Print Preview. In Print Preview, you can observe that when a record has notes, the notes text box automatically expands to fit the content. For records without notes, the text box appears to disappear, and there is no visible gap. This is because the Can Grow property is enabled by default for text boxes, allowing them to expand. However, if other items, such as labels, are placed horizontally in line with that text box, the report cannot shrink down to remove empty space for records without notes. To address this, you should remove any unnecessary labels that are next to your notes field if you want the space to shrink when there are no notes. I explained how to inspect the properties of the text box, ensuring both Can Grow and Can Shrink are set to Yes. By deleting the label and checking these settings, the empty space for records without notes is minimized as much as possible. It is equally important to remember that the entire section, such as the detail section, also has a Can Shrink property that must be enabled. By default, this is set to No. You will need to change it to Yes to allow the detail section to contract when a control within it is empty. This simple change resolves the issue and ensures there is no wasted vertical space for records without notes. For those interested in more advanced topics, I also cover how to keep a label visible and hide it dynamically depending on whether the notes are present. Additionally, if you have images on your reports, I explain how to apply the same concept to images using the Can Grow and Can Shrink properties. These extra techniques are featured in the Extended Cut available to members of my website. Silver members and higher have access to all Extended Cut videos, along with additional resources such as sample databases used in my TechHelp videos and the Code Vault, which includes a collection of useful functions. Platinum members gain access to all these benefits plus my full-length beginner and some expert courses, covering not just Access but also Word, Excel, Visual Basic, ASP, and more. You can keep enjoying these free TechHelp videos, and as long as there is interest, I will continue producing them. Feedback is always appreciated, so feel free to like the video, post comments, and subscribe to the channel for the latest updates. Follow additional links for free lessons and more resources. If you would like to be notified by email when I post new videos, join my mailing list since YouTube no longer sends out email notifications for new uploads. If you have not tried my free Access Level 1 course yet, I recommend it as it covers all the essentials of building databases in Access. It is available both on my website and on my YouTube channel. Level 2 is just one dollar and is free for all YouTube channel members. If you want your questions featured in a future video, visit my TechHelp page to submit your question. A complete video tutorial showing all these steps is available on my website at the link below. Live long and prosper, my friends. Topic ListSetting Can Grow and Can Shrink properties in Access ReportsCreating a simple customer report in Access Adding first name, last name, and notes to a report Binding a report to a table as a record source Adding and positioning fields in report design view Removing wasted space in the detail section of a report Understanding default Can Grow property settings Explaining the effect of empty fields on report space Deleting labels to enable Can Shrink for text boxes Adjusting Can Shrink property for report detail sections Saving and previewing report changes for space optimization Troubleshooting persistent wasted space in reports Requirements for Can Shrink to function properly |
||||||||||||||||||||||||||||
|
| |||
| Keywords: TechHelp Access can grow, can shrink, cangrow, canshrink, can grow can shrink access report, access can shrink not working, resize text box, resize control, go home, can shrink images, can shrink image control, can shrink pictures, resize images, visible PermaLink Can Grow, Shrink in Microsoft Access |