Access Developer 41
Form Zoom, Anchoring, Form On Error Event
Welcome
In today's class, we're going to focus on zooming in and out of a form. This is one of the major complaints that people always have when it comes to Access. In other applications like Word and Excel, you can zoom in and out. You can make the document bigger, the spreadsheet smaller, and so on. Not so in Access... until today.
We're also going to learn about form level error handling events. You can have event error handlers that cover the whole form, that can take care of all kinds of different error responses. You can get rid of some of those built in user-unfriendly error messages.
Resources
Topics Covered
In Lesson 1, we're going to begin by learning about anchoring, which is a technique that allows you to resize the controls, like the text boxes, on your form. People with different screen sizes can stretch the form and have bigger text boxes. You can also anchor buttons. They can stay in the bottom right corner, for example. As the form gets bigger, those buttons move.

In Lesson 2, we're going to learn how to actually zoom in and out of forms by making the controls, the forms themselves, and the fonts larger and smaller.

In Lesson 3, we're going to make FormZoom a public level function so we can call it from any form in the database. We'll set maximum and minimum zoom level so the user can't zoom in too far or out too far.

In Lesson 4, we're going to deal with different sections on the form, like the form header form footer. Those have to grow and shrink too. We'll deal with subforms. Not only do you have to grow and shrink the subform control, but you have to handle all of the objects inside that control, which is another form, which means we have to learn recursion, which is having to have the zoom function call itself. That's pretty cool. Then we'll learn the activate event, which I did cover briefly back in Access Advanced Level 1.

In Lesson 5, we're going to learn about form-level error events. This is an event handler that happens before a validation rule and before any control level error handling. You can use these to put your own custom error messages there instead of the unfriendly Access default error messages that sometimes pop up.

Enroll Today
Enroll now so that you watch these lessons, learn with us, post questions, and more!

Questions?
Please feel free to post your questions or comments below. If you are not sure as to whether or not this product will meet your needs, I'd rather help you before you buy it. Remember, all sales are final. Thank you.
Keywords
microsoft access, access 2016, access 2019, access 2021, access 365, ms access, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #instruction, #learn, #lesson, #training, #database, Access Forms using with different screen resolutions, Access Form Resizing Based on Screen Resolution, Shrinker, Stretcher, Zoom in, zoom out, zoom in access forms, zoom out access forms, automatic form resizing, form resizer, dynamically resize forms and controls, DoCmd.Maximize, multiple monitor sizes, recursion, recursive, windowleft, windowtop, windowheight, windowwidth, controltype, acsubform, Form-Level Error Handler, Error Numbers, Response, Form.Error Event, The value you entered isn't valid for this field, acDataErrContinue, acDataErrDisplay
Intro In this lesson, you will learn how to zoom in and out of forms in Microsoft Access, including techniques to resize controls and adjust font sizes for better usability across different screen sizes. We will cover anchoring controls, implementing zoom functions with custom maximum and minimum levels, handling zoom at the form and subform level using recursion, and working with the OnActivate event when switching between forms. You will also learn about form-level error handling and how to create custom error messages to replace the default Access error prompts. This is Microsoft Access Developer Level 41.Transcript Welcome to Microsoft Access Developer Level 41 brought to you by AccessLearningZone.com. I am your instructor, Richard Rost.
In today's class, we're going to focus on zooming in and out of a form. This is one of the major complaints that people always have when it comes to Access. In other applications like Word and Excel, you can zoom in and out. You can make the document or spreadsheet bigger or smaller. You can't do that in Access. So in today's class, we're going to see how you can do that, kind of. We'll show you some really cool tricks.
We're also going to learn about form-level error handling events. You can have events that cover the whole form. They can take care of all kinds of different error responses. You can get rid of some of those built-in, user-unfriendly error messages.
This class follows Access Developer Level 40. I strongly recommend you have finished all of my previous classes: Beginner, Expert, Advanced, and Developer levels before continuing with today's class. My lessons are really designed to be followed one after the other, so don't skip levels. See this page for details.
This class is recorded with Microsoft Access as part of a Microsoft 365 subscription, which I strongly recommend. It's currently 2022, so if you're using the retail version, this is roughly equivalent to Access 2021. However, the lessons covered in today's class should work with any version of Access going back to 2007.
If you have any questions regarding the material covered in today's class, just scroll down to the bottom of the page that you're on and post your questions there. Take a minute to read through any other questions that may have been posted, as your question may have already been answered. Also, make sure you click on the red subscribe button to get notified if any other questions or comments are posted for this class. Make sure you visit the Access forum on my website if you have any questions about Access in general.
Let's take a closer look at exactly what's covered in today's class.
In lesson one, we're going to begin by learning about anchoring, which is a technique that allows you to resize the controls like the text boxes on your form. People with different screen sizes can stretch the form and have bigger text boxes. You can also anchor buttons so they stay in the bottom right corner. For example, as the form gets bigger, those buttons move. That's all covered in lesson one.
In lesson two, we're going to learn how to actually zoom in and out of forms by making the controls, the forms themselves, and the fonts larger and smaller.
In lesson three, we are continuing to work with zoom levels. We're going to make form zoom a public-level function so we can call it from any form in the database, and we'll set maximum and minimum zoom levels so the user can't zoom in too far or out too far.
In lesson four, we're going to continue and finish with zoom levels. We're going to deal with different sections on the form, like the form header and form footer. Those have to grow and shrink too. We'll deal with subforms, and not only do you have to grow and shrink the subform control, but you have to handle all of the objects inside that control, which is another form. This means we have to learn recursion, which is having the zoom function call itself. That's pretty cool.
Then we'll learn the OnActivate event, which I did cover briefly back in Access Advanced 2, way back 40-some lessons ago. This is what happens when you jump from form to form. So there is lots of cool stuff in lesson four.
In lesson five, we're going to learn about form OnError events. This is an event handler that happens before a validation rule and before any control-level error handling. You can use these to put your own custom error messages there instead of the unfriendly Access default error messages that sometimes pop up.Quiz Q1. What is the main focus of Microsoft Access Developer Level 41? A. Exporting reports to PDF format B. Creating and managing database relationships C. Zooming in and out of a form D. Advanced query building techniques
Q2. Which feature is NOT directly supported in Access compared to Word and Excel? A. Sorting data in tables B. Zooming in and out of documents/forms C. Filtering records D. Running macros
Q3. What does anchoring allow you to do on an Access form? A. Link tables to external data sources B. Change table structures automatically C. Resize controls so they move or stretch when the form is resized D. Encrypt your database
Q4. What is one benefit of anchoring command buttons on a form? A. They always print in black and white B. They stay visible even when hidden C. They move or stay in position as you resize the form D. They automatically run queries
Q5. In lesson two, what aspect of forms are you learning to zoom? A. The database tables B. The controls, forms, and fonts C. Only the form headers D. Only the report layouts
Q6. What is a public-level function for form zooming designed for? A. To adjust zoom only in table view B. To allow zoom to be called from anywhere in the database C. To set up scheduled backups D. To print multiple forms at once
Q7. Why are maximum and minimum zoom levels set in lesson three? A. To prevent users from deleting data B. To prevent users from zooming in too far or out too far C. To avoid printing errors D. To restrict access to certain forms
Q8. What does recursion help accomplish when zooming subforms? A. It prints the form header and footer B. It calculates field totals automatically C. It allows the zoom function to call itself to handle all objects inside subforms D. It hides certain controls based on user permissions
Q9. What event occurs when you switch from one form to another? A. OnClick B. OnLoad C. OnActivate D. OnDoubleClick
Q10. Where does the form OnError event occur in the error handling sequence? A. After control-level error handling B. At the same time as validation rules C. Before a validation rule and before any control-level error handling D. Only after closing the form
Q11. What is the advantage of using the form OnError event? A. It deletes all error messages B. It allows you to show your own custom error messages instead of Access default messages C. It encrypts user data automatically D. It compresses the database
Answers: 1-C; 2-B; 3-C; 4-C; 5-B; 6-B; 7-B; 8-C; 9-C; 10-C; 11-B
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.Summary Today's video from Access Learning Zone focuses on a feature that many Access users often wish for: the ability to zoom in and out of forms. Unlike programs such as Word or Excel, Access does not have a built-in zoom slider to make forms larger or smaller. In this class, I will show you several clever techniques to achieve a zoom effect in your Access forms.
Another topic we will address is form-level error handling events. You can use these events to manage errors across the entire form and customize the kinds of messages that your users see, replacing some of Access's less user-friendly default error messages.
This lesson continues from Access Developer Level 40. I highly recommend that you have completed all prior Beginner, Expert, Advanced, and previous Developer courses before starting this one. My curriculum is structured in a specific order, and it is important to follow the sequence for the best learning experience. If you are unsure about your progress or what you need next, more information is available on my website.
I recorded this class using Microsoft Access as a part of a Microsoft 365 subscription, which is what I recommend for most users. If you have the retail version, you should find it closely matches Access 2021. The lessons today apply to any version of Access from 2007 onward, so you should have no trouble following along.
If you have any questions about the material, you can post them at the bottom of the page for this course. I suggest looking through any existing questions and answers in case your issue has already been addressed. To stay updated with new discussions related to this class, make sure to subscribe as well. For broader Access questions, check out the Access forum on my site.
Here is what you will find in each lesson of this class:
We begin with lesson one, where I introduce anchoring. This technique lets you adjust the layout of forms so that controls like text boxes or buttons resize automatically. For instance, as users stretch the form window to fit their screens, the controls expand or reposition so everything still looks good. You'll see how to anchor items such as buttons to keep them in the lower right corner as the form size changes.
In lesson two, I will demonstrate how to simulate zooming in and out on your forms by dynamically adjusting the size of controls, the form itself, and even the font sizes.
Lesson three builds on this by turning the zoom feature into a public-level function, making it accessible across all forms in the database. I will also show you how to set minimum and maximum zoom levels so users cannot go beyond reasonable limits.
Lesson four wraps up the zoom functionality. We will address resizing different form sections like headers and footers. You'll learn how to handle subforms, making sure everything inside of them also resizes correctly. This will introduce you to recursion, where a function calls itself to ensure every element is adjusted properly. We will also touch on the OnActivate event, which is triggered when you switch between forms, a topic I first mentioned in Access Advanced 2.
In the final lesson, lesson five, I will cover the form's OnError event. This event occurs before validation rules or other control-level error handlers. With this, you can provide your own custom error messages, offering a better user experience than Access's default alerts.
You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends.Topic List Anchoring controls to resize with form Anchoring buttons to form corners Making form controls and fonts zoomable Implementing zoom in and out functionality on forms Creating a public function for form zoom Setting minimum and maximum zoom levels Resizing form headers and footers with zoom Handling subform resizing and zooming Using recursion for zooming subform elements Applying the OnActivate event for form switching Form-level OnError event handling Replacing default Access error messages with custom messages
|