Modal & Popup
By Richard Rost
4 years ago
Create Modal and Popup Forms in Microsoft Access
In this Microsoft Access tutorial, I'm going to show you how to create modal and popup forms. We'll learn what they are, how they're different, and how to use each of them. We'll build a little stay-on-top sticky notepad form.
Recommended Course
Links
Keywords
access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, #fasttips, modal, popup, dialog, stay on top, must close form, Popup Form vs. Modal Form, autocenter, z-index, stickypad, sticky pad, sticky notepad, notepad
Subscribe to Modal & Popup
Get notifications when this page is updated
Intro In this video, we will talk about the differences between modal and pop-up forms in Microsoft Access, how each behaves in your database, and when to use them. I will show you step-by-step how to set up a simple notepad using a pop-up form, how to configure form properties like Auto Center, and what happens when you combine modal and pop-up settings. If you want more control over how forms interact and appear in your Access applications, this video will help you understand these features.Transcript Welcome to another Fast Tips video brought to you by accesslearningzone.com. I am your instructor Richard Rost. In today's video, we're going to learn about modal and pop-up forms: what they are, how they're different, how to use them, and we're going to create a little note pad, sticky note pad that will sit on top of our Access database window.
So, modal and pop-up - what's the difference? A modal form stays on top of other forms and you cannot click on anything behind it. For example, I've got Customers and Contacts. If I click on the Contacts button, it opens up my Contacts form, which contains all the contacts for that customer. I don't want someone to be able to go back here and then change the customer because now I might think that these contacts belong to this customer. So you might want to make your Contacts form modal and you can do that very easily. Go to Design View, open up the properties for the form, go to the Other tab, find pop-up and modal, find modal, and change it to Yes. Save it, close it, and now open it up again.
One thing you'll notice is the Navigation Pane snaps shut whenever you open up a modal form. That's by design, but remember, your end users aren't going to see this anyway. We always hide the Navigation Pane from our end users. If you don't know how, then go watch my Simple Security video and I'll tell you all about it.
But once this modal form is open, I can't click behind it. If I try, Access is beeping here. I can't do anything with anything else behind this until I close the modal form and then everything goes back to normal. So that's a modal form. Use that so that the user can't change anything that this form might rely on behind it, where you want them to fill in some information that they have to do before they can do anything else. That's the benefit of a modal form.
Now, a modal form is different from a pop-up form in that you are allowed to click behind a pop-up form. You can use this, for example, for a notepad that we're going to build in a second. You might want to click on it, open up the notepad, move that over to the side, but still continue to work with your database as normal.
Let's make a little notepad. Let's close this guy. Let's make a table - Create, Table Design. It's a simple table to store our notes, and we have a NoteID, an autonumber, and then Notes. This will be long text. Save that as MyNoteT, my note table, primary key, sure. I can close this, close this.
Let's borrow my continuous form that I already have built. If you haven't watched the video where I build this TechHelp free template, go watch that now. It explains where all these blank template forms came from. You'll find links to all these free videos down below in the description below the video.
I'm going to copy my continuous form here: copy, paste, Control-C, Control-V. We'll just call this NoteF, my note form. We'll design this guy, Design View. I don't need that, I don't need that label. In fact, I'm going to turn the form header/footer off.
Let's change the detail background color to yellow. Let's go with that yellow there. That's really bright, so let's drop that down. Go to More Colors and we'll make it a little more subtle, like there. That's much better. Let's change the color of that as well. We can use the same color.
Now, we have to bind the note form. Go to Data, and we have to bind that to MyNoteT. Now that form is connected to the note table. Anything that I put in these fields in here will save in that table. We have to bind this field to our Note field, so go to Control Source and change that to Notes. I'm also going to change the name: copy, paste.
Now I'm going to take this, slide it over there, and make this as wide as you think you're going to want it, maybe about that wide. Let's bring in that edge of the form over here and bring that over there. If you don't know how to do all these little form techniques that I'm showing you, watch my Access Beginner 1 course. It's four hours long. It covers all the basics: form design, formatting, tables, queries, all that stuff. Watch this if anything that I'm doing right now looks unfamiliar to you.
Now I've got this. Let's save it. Actually, let's make this note field a little bit bigger. This is going to be long text, so let's make it bigger. There we go. Save it, close it, and now when I open it back up again, there's my notepad. I can slide it over here and I can do stuff.
Wait a minute. I want that notepad to stay on top of other windows. So that's what the pop-up form does. Go to Design, go to Other, set Pop Up to Yes. Save that, close it, close it. Now, when I open up my notepad and I open something else up, look, it stays on top of it. The benefit of that is you could put it anywhere in your database window, or you can even move it outside the database window itself.
See that? Here's Access. This guy sits on top of Access. It's got a higher Z index. What is Z index? That's up and down on your screen. You've got X, Y going left, right, up, and down. Z goes basically in and out. A higher Z index means it sits on top of other windows.
You can put your notes in here: Buy new Oton for Pidos and whatever. You can put as many notes in this little notepad as you want. You can stick it up in the corner of your screen and use it whenever you want to use it.
Now, one thing I don't like about the pop-up property is that if you have a multi-monitor setup like I do, this guy might pop up anywhere. If I have the database window on a different screen and I open it there, this guy might be on screen 2. That's where you last left it. That's another bug too. See, I just went into design mode and it went right up here in the corner. It's almost like minimized. That's like a glitch in Access. That's been around forever. They haven't fixed it. I've said something to them a couple times.
What I like to do is set the Auto Center property. You go to Format. Auto Center by default is No. By default, Access tries to remember where that form last was. Auto Center will start it right in the middle of your Access database window. So if I open it now, it goes right there. I like that for pop-up windows. You want them front and center in the middle of your database, not popping up possibly on some other screen. If you've only got one screen, that's not a big deal. You can resize it, move it over here, put it where you want it, close it.
Here's a trick with both of them. Both pop-up windows and modal windows still allow you to access the ribbon and all the toolbars and stuff back there. But let me close this. See, this guy I opened second. So this one is modal and it's technically on top of this one because I can't click over here since I opened this one second. It's kind of weird. Windows work backwards. The most recent modal window you open, if you open multiple ones, you have to close the top one first, which is this guy, because you can open another window from a modal window.
If I make my customer form modal and then open this one, I have to close this one first. You get the hang of it once you do this for a little bit.
What I was trying to say is if you take a window and make it both modal and pop-up, if you set these both to Yes, that locks everything behind that form. So now, if I open that form up, I literally can't click on the ribbon or anything behind it. It's a straight dialog box. If you want to make it so the user can't do anything aside from interact with this form, make it modal and pop-up, and I recommend setting Auto Center to Yes.
So that's modal and pop-up. If you want to learn more about these properties, I cover them more in my Access Expert Level 4 class. We go over them in a little more detail.
There's your fast tip for today. I hope you learned something and we'll see you next time.
How do you become a member? Click on the Join button below the video. After you click the Join button, you'll see a list of all the different membership levels that are available, each with its own special perks.
Silver members and up will get access to all of my extended cut TechHelp videos, one free beginner class each month, and more. Gold members get access to download all of the sample databases that I build in my TechHelp videos, plus my Code Vault where I keep tons of different functions that I use. You'll also get a higher priority if you decide to submit any TechHelp questions to me, and you'll get one free expert class each month after you've finished the beginner series.
Platinum members get all the previous perks, plus even higher priority for TechHelp questions, access to all of my full beginner courses for every subject, and one free developer class each month after you've finished the expert classes. These are the full-length courses found on my website, not just for Access. I also teach Word, Excel, Visual Basic, and lots more.
You can now become a Diamond sponsor and have your name or company name listed on a sponsors page that will be shown in each video as long as you're a sponsor. You'll get a shout out in the video and a link to your website or product in the text below the video and on my website.
But don't worry, these free TechHelp videos are going to keep coming. As long as you keep watching them, I'll keep making more, and they'll always be free.Quiz Q1. What is the primary function of a modal form in Microsoft Access? A. To stay on top of other forms but allow clicking behind it B. To stay on top of other forms and prevent clicking behind it C. To act as a main menu for the database D. To automatically save all records
Q2. How do you enable a form to be modal in Access? A. Set the Pop Up property to Yes in the property sheet B. Set the Modal property to Yes in the property sheet C. Save the form with a .modal extension D. Use a macro to lock other forms
Q3. What distinguishes a pop-up form from a modal form? A. Pop-up forms cannot be resized B. Pop-up forms allow clicking on things behind them C. Pop-up forms automatically close when you open another form D. Pop-up forms are not visible on the screen
Q4. Which property combination makes a form into a straight dialog box where nothing can be accessed behind it, including the ribbon? A. Only Modal set to Yes B. Only Pop Up set to Yes C. Both Modal and Pop Up set to No D. Both Modal and Pop Up set to Yes
Q5. What does setting the Auto Center property to Yes do for a form? A. Hides the form from view B. Opens the form at the position it was last closed C. Opens the form in the center of the Access database window D. Changes the background color of the form
Q6. What is the benefit of using a pop-up form for a notepad feature in Access? A. It stays on top and allows users to continue working on other database objects B. It prevents users from clicking anywhere else until it is closed C. It hides all other open forms automatically D. It only allows one user at a time to access the database
Q7. What issue can occur with pop-up forms on multi-monitor setups in Access? A. They cannot be resized B. They always appear on the primary monitor only C. They may open on a different screen from where the database window is located D. They always appear minimized
Q8. What does the Z index determine for forms in Access? A. Their color B. Their tab order within the form C. Their position in front of or behind other windows D. The number of records displayed
Q9. Why might you want to make a Contacts form modal when opening it from a Customer form? A. To allow editing the customer while viewing contacts B. To prevent changing the customer while viewing their contacts C. To make the Contacts form pop up on a separate monitor D. To disable navigation in the database
Q10. If a user is unfamiliar with form design and formatting in Access, what is recommended? A. Watch the Access Expert Level 4 class B. Watch the Access Beginner 1 course C. Download sample databases D. Open forms in Macro view
Answers: 1-B; 2-B; 3-B; 4-D; 5-C; 6-A; 7-C; 8-C; 9-B; 10-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 the differences between modal and pop-up forms in Microsoft Access, how to use each one effectively, and provides a hands-on example by creating a simple sticky notepad that stays visible while you use your database.
Let's start by clarifying what modal and pop-up forms are and how they function. A modal form is designed to stay on top of other Access forms, and while it is open, you cannot activate or interact with any forms or objects behind it. A practical example involves working with a Customers form that links to a Contacts form. If you open the Contacts form, making it modal ensures users cannot switch back to the Customers form and make changes that might cause confusion about which contacts belong to which customer. To set a form as modal, you simply go into its properties under the Other tab and set the Modal property to Yes. Once this change is made and the form is reopened, it always remains on top, and you must close it before any other part of your database becomes accessible again.
Access also hides the Navigation Pane when a modal form is open, but this is generally not noticeable for end users, since in a typical production database you should have the Navigation Pane hidden anyway. If you're unsure how to disable the Navigation Pane, I have a separate video called Simple Security that covers this topic.
The main advantage of modal forms is that they focus user input and prevent changes in other areas of your database that could impact the form's data or logic.
Pop-up forms, by contrast, stay on top of the Access database window but still allow interaction with other forms or objects in the background. This makes pop-up forms ideal for utility windows, such as the sticky notepad we are building in this tutorial. With a pop-up, users can leave the form visible while continuing to work with other parts of the database.
To create this notepad example, you start by making a simple table with an AutoNumber primary key and a long text field for your notes. After saving your table, you design a corresponding form. You can re-use an empty continuous form if you already have one, then adjust the design as needed — for example, changing the background color to something like yellow for a sticky-note appearance and toggling off extra elements like headers and footers. You then bind the form to your table and ensure the text box is linked to the note field. It's also useful to resize the form and text box for ease of use.
Once your form layout is ready, setting the Pop Up property to Yes in the form's properties ensures it remains on top of the Access window, even if it's moved elsewhere on your screen. Pop-up forms can even sit outside the database window, always remaining accessible while you're working. This behavior is managed by the Z index, which refers to how windows stack visually on your computer screen, clarifying why some windows sit on top of others.
One limitation to be aware of is how pop-up forms interact with multi-monitor setups. Access remembers the last position of a pop-up form, so if you move it to a second monitor, it may reappear there the next time you open it. Auto Center, an additional property you can set under Format, is a helpful option here. Turning on Auto Center ensures your form opens centered in your main Access window, rather than wherever it was last positioned.
Another point to consider is that both modal and pop-up forms typically allow the user to access the ribbon and toolbars in Access, unless you set both Modal and Pop Up properties to Yes. When both are set to Yes, the form becomes a true dialog box, completely locking out the rest of Access until the form is closed. For dialog situations where the user must respond before moving forward, this combination, plus Auto Center, provides a very controlled environment.
For those interested in more advanced uses and properties of modal and pop-up forms, I cover them in greater detail in my Access Expert Level 4 course.
If you're interested in more learning and support, I offer several membership levels. Silver members get access to all extended cut TechHelp videos, a free beginner class each month, and more. Gold members can download all sample databases used in my videos, access my Code Vault, and receive higher priority for TechHelp questions, along with a free expert class each month once you've completed the beginner series. Platinum members enjoy all previous perks, even greater priority, access to all full beginner courses for every subject, and a free developer class each month after finishing the expert series. I teach more than just Access, including Word, Excel, Visual Basic, and others.
As a reminder, all of my TechHelp videos are free and will continue to be available. If you've learned something valuable today, feel free to check out my complete video tutorial with detailed, step-by-step instructions covering everything discussed here, available on my website at the link below.
Live long and prosper, my friends.Topic List Difference between modal and pop-up forms in Access How to set a form as modal in Access Behavior of modal forms in restricting user actions How to set a form as pop-up in Access Behavior of pop-up forms allowing background interaction Creating a note-taking table in Access Designing a simple notepad form Customizing form background color for notepad Binding the notepad form to a table Configuring form controls to link to table fields Resizing and formatting the notepad form Setting the Pop Up property for always-on-top effect Explanation of Z index for form stacking order Setting the Auto Center property to control form position The effect of combining modal and pop-up properties Limitations and quirks of pop-up and modal forms Choosing the right properties for dialog boxes and utility forms
|