How to Create and Configure a Custom Pop-Up Form in MS Access

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i'm your host sean mckenzie thank you for joining me once again on my channel on data engineering in this episode we return to our microsoft access playlist and we're going to look at how to build a pop-up form that looks pretty good and uh you know that you can use that users cannot bypass and things like that and uh with different options and ways that you can do it and so without further ado let's get to our pop-up form in microsoft access need help for coaching on your project make sure to check out my patreon the link is in the description okay so there's a storm raging outside and all of the roads were washed out and i could not make it to the office today but i wanted to do a quick video for you guys and i'm so i'm doing it at home here and so what i wanted to do is i wanted to create a new form and i want to make a pop-up form that is custom and you know not a message box like we did in previous episodes but i want to make them a pop-up form that sort of has the nice look and feel that i want and i don't want it to have all the extra stuff on it and so um and i don't want users to be able to bypass it and so what i'm going to do is i'm going to go to create and i'm just going to take a blank form here you could do this with a form that has you know a record set you know attached to it but you don't have to have that either and what i want to do is i'm going to take this form and i'll go to design view here and you can see this is sort of like the default size and i'll make it a bit smaller and now one of the things that you'll that you might want to do before we even do anything on a form like this is we're going to create a way for us to get out of it because once we start locking things down a little bit it might not be so easy to to to get out of it and so uh what i'll do is i'll i'll grab off of our form design here i'll go to controls and i'm gonna grab a button and i'll just put a button on there and uh i guess you i'll cancel the wizard there and i'll just say close so that we have a way of getting out of our out of our form once we sort of lock things down a little bit and i'll go to properties and i'll call this button you'll go in the other tab and you can give it a name so i'll call it i'll call it cmd close and uh and then i'm gonna on the event here i'm gonna say on click i'll click the ellipsis and then the code builder and there we go so now you can see when i click the ellipsis it created this subroutine here and all i'm going to do in this is i'm going to say do command dot close and then i'll go ac form and then i'll say me dot name and that's gonna close the form that has you know the name it'll close me because i'm putting me dot name you can also just put in quotes the name of your form there and uh and then you know i'll save it as i'll save it as pop-up form pop-up form and then we can start getting into the the sort of cool stuff so now if i if i save that and i and i open in a form view you'll notice that it opens sort of attached to all of this stuff here you know the ribbon and everything it sort of seems embedded you can't really grab it or anything and so um we'll go back to our design and uh and this is where we can start uh you know looking at different things now typically for this type of thing you want to have a a good caption you know you know for whatever purpose you you're using this you know that's gonna appear at the top so if i save that and i go here you'll see it appears on the tab there but when we switch a couple other options it's going to actually show up in the toolbar which is really cool too or i should say the title bar so the default view you can leave it as single form and then we're going to go down through all of these options here and we're going to say allow form view yes we're going to say allow data sheet view no we'll say no for layout view we don't have any picture types and we can go all the way down to auto center and we'll put a yes for that and we'll say auto resize is going to be no and fit to screen will be no and i'll scroll down a little bit here because this is where we get into the border style and stuff like that so the sizable border style is the one that sort of well i can show you um you might see it on here or not oh because it's not popped up yet but um you can see the border style is sort of that it's got the sort of ripple on it whereas what we want is we're going to take the thin border style and uh and then we'll take the record selectors as no navigation buttons no because that's going to get rid of all that stuff that's attached to the default form and and then we'll say no for dividing lines and we don't want to have any scroll bars on this so we're going to put neither and we'll even take the control box in this case which is the uh the control box is the uh it's got like the minimize and and the close button in it on it and we want to be able to remove that stuff in case we want a particular pop-up with that the user can't really get out of and that's something that we can build here and so in this case what i'm going to do is i'm going to say control box no and close button no because we put a we did put a close uh button of our own and then the min and max uh there will be none um so that this is gonna what it's gonna do is gonna create a form that uh it has very few options for the user to do things and that's kind of what we want to do when we want to control uh controlled user sort of interaction and so what i'll do here is i'm going to go to the other tab and now what we're going to do is we're going to choose this pop-up and we're going to say yes and that's going to give us a pop-up and now if i save that before i you know finish up here now when i click this button you'll see now we've got a pop-up a nice sort of pop-up form it's you know it doesn't have anything that i can you know click to get out of it and uh well at current i can go back and i can you know go back to my database here and you can see i can operate things you know my menus and things like that but we're gonna shut that off here too and so that's why we put the close button in there so now we can go back to our design and we can we're going to set this modal the modal property to yes and that's gonna make it so that users uh they they can't really bypass it so if i go back here you can see now now if i try to click on my menus or do something else in the application i can't really do it um the only thing i can do is work with the stuff that i have in my form here and that's kind of what we want so um so that's uh that's something that uh is very very handy there and so you might have you know some other text boxes or things like that on your form you know like you know things that people have to fill out you know how you might have a couple text boxes i don't know and like uh you know something something along those lines maybe some more buttons for people to do things and and uh you know uh whatever you know like it could be uh okay or close or you know something like that uh and so so what that allows us to do is now we've got this form and and it's kind of got the style that we want and when we open it you know it's got the uh the text boxes or you could have a record set or this could be a bound form and users can't really get away from the form to do other stuff they have to do you know go in and do what they need to do and click ok or click close okay and so i wasn't totally happy with that size there so i might go back and set the auto resize to yes uh and uh let's see here you can play around with these settings and uh and and find out what works for you and in general you'll find that different situations you need different settings okay so that's better and if i close that and i go to you know you can move your you know center things and stuff like that make it look a little bit nicer i don't i won't really spend time on that here but you can see that's the different um that's how you can create the pop-up form now i can show you the the stuff that i didn't like um i like this is called the thin border so you see how it sort of it's nice and it sits above there that's how the uh the uh the border style is sizable oops sizable and that's the default i know it doesn't look terrible i guess in this case it doesn't really look that much differently but in some cases it does look quite a bit different um and uh but definitely you can play around with that and and there's also you know the navigation buttons if you do have like i said if you do have a record set in there then you know the navigation buttons that's that setting but most times when i use a form like this it's usually because i need a very specific thing from the user before they can continue and i need them to you know select some options and they can't get out of it and that type of stuff and so i'll set that one to no and that is how you can create a pop-up form uh in microsoft access hope you enjoyed today's discussion on how to do a pop-up form in microsoft access if you like what you saw today please make sure to like the video and make sure to subscribe if you haven't subscribed yet and if you have any questions or comments put those in the comment section below have a great day have a safe day and i'll catch you next time need extra technology help on your project make sure to check out the link in the description
Info
Channel: Sean MacKenzie Data Engineering
Views: 372
Rating: undefined out of 5
Keywords: How to Create and Configure a Custom Pop-Up Form in MS Access, ms access popup form, access popup form, access modal form, sean mackenzie data engineering
Id: jB05uECcNTI
Channel Id: undefined
Length: 11min 41sec (701 seconds)
Published: Tue Nov 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.