Another way to develop an Access form is to start with the wizard. Because the first step in the process is to gather records to display, the form wizard begins with the same initial steps as the Query Wizard. In this video, learn how to gather records from the source table and organize a pair of forms that will allow a user to select a hotel guest, and then open a second form to view their visit history and reservations at the hotel.
- [Instructor] The Form Wizard will walk us through some additional options that we have when creating a form, giving us more flexibility in how the form is organized than the simple one click method did. Let's create another form based off of our Guest table. We'll start with the Create tab, and then we'll come into the Forms group, and click on Form Wizard. This'll start with a screen that might look familiar to you. We saw the same screen when we worked with Query Wizards. Essentially, what we're going to do here is create a Query that the form will be built off of. So I'll start with the information coming out of our Guests table. Make sure that that's selected in the drop-down menu here.
From the Guests table, I'm gonna pull in data from the FirstName field. I'll go ahead and click FirstName and click on this arrow to move it over to the selected field side. We'll do the same with LastName. I'll choose the EmailAddress to move over, as well the Phone field. Then I'm gonna come back to the drop-down list and I'm gonna choose the other table that I'm interested in, the RoomAssignments table. From this table, I'll choose the CheckInDate and Room ID. With all the fields over here on the selected fields side, I'll press the Next button, and then we have a few decisions to make on how we want to view our data. We could either group it together by Guest, in which case we'll have our Guest data in here in one section, and the CheckIn data from the RoomAssignments table in another section.
Or we can group everything together, and then it'll just place everything on a single line. Let's keep it separated by Guests. With that option chosen, we also have two options down at the very bottom. We can either group it with a subform, which is what we saw when we had the one click method where the CheckInDate, and the RoomID will appear in its own subform below, or we could try the Linked Forms options, which will give us a different look. With this method we'll have one form that includes the data from the Guest table, and then we'll have a second form that's linked to it that shows information from the RoomAssignments table. Once we've selected a guest in the first form, the second form will only show us the records that relate to that person.
I'm gonna choose Linked Forms and press Next. Now because we're creating two forms we have to name both of them. The first one I'll call CheckIn Guests, and the second one I'll call CheckIn RoomAssignments. Finally we can decide whether we want to open the forms to view the information, or jump straight into Design view to continue working on this layout. I'll choose the first option here and press Finish. Then I'll see both of those forms over here in the Navigation pane, and it'll start the process with CheckIn Guests form, which is what we have on the main screen here.
On this screen, we see the first name, last name, email address, and phone number for our different guests. We can page through them here. I'm a go ahead and go to record number 10, which belongs to our friend Barbara Hayes. You'll notice that unlike the first form that we created, not all the fields from the Guest table are present because we only chose a select few to include here. Just the ones that are important to see when checking guests into the hotel. There's a button up here on the top that'll link us to the RoomAssignments form, however there's a little bit of a bug here in Access where there's a title that actually appears above the button, which makes it unclickable.
To fix this, we're gonna jump into Layout view real quick. I'll just click on the View button over here. Then I'll click on the title that says CheckIn_Guests, and using the Right Arrow on my keyboard, I'll just hold that down to scoot that over to the right. Then I'll click on the button to select it and scoot that way over to the right, and then I'll click on the title again, and press the Left button with your Left Arrow to move it back to the left. That'll free up our button so that we can click on it. I'll go ahead and Save the changes to the form and switch back into Form view. Now, with Barbara Hayes still selected, I can click on the CheckIn RoomAssignments button.
That'll go ahead and open up the RoomAssignments form, and we can see Barbara's details right here. So using the Form Wizard, we have more control over exactly what fields and from which tables get displayed in the form. Since this form could be used to book reservations for our guests, there isn't really a reason to include their full address or other details here. It's just clutter. Keeping the form's contents specific to the designated tasks makes for a much cleaner user experience.
Released
9/24/2018- Determine the essential uses for the Trust Center.
- Explore the functions of the database Navigation pane.
- Recognize the fundamentals of entering data when using Access.
- Identify the necessary steps when importing a table when using Access.
- Break down the fundamentals of filtering and sorting table data in Access.
- Identify the method utilized when building queries in Design view.
- Determine the role of forms in Access.
- Examine all of the elements involved in maintaining a database in Access.
- Explore how to properly protect an Access database with a password.
Share this video
Embed this video
Video: Using the Form Wizard