Locked lesson.
About this lesson
Limit users to just the forms they need by creating a navigation form.
Exercise files
Download this lesson’s related exercise files.
13.03 navigation-form - Exercise.docx43.3 KB 13.03 navigation-form - Exercise solution.docx
80.1 KB TechGurusTicketing32.accdb
2.7 MB TechGurusTicketing32 - Complete.accdb
2.7 MB
Quick reference
Navigation Form
Create a tabbed Navigation Form.
When to use
We create a navigation form whenever we want to limit what parts of the database users have access to. We can set the navigation form to load on startup and disable access to everything else.
Instructions
Navigation forms can be used to limit users to just the forms they need and prevent unwanted changes to backend tables and queries. Tabs can be added to the navigation form to make it easy to access multiple forms.
We can set the navigation form to load when Access is started and disable the navigation pane so other database objects like tables and queries are not visible.
Create a Navigation Form
In our example, we only want users to be able to access 'frmTicketMaintenance' and 'frmCompanyTabular'.
- From the Create tab, in the Forms group, select Navigation.
- Select Horizontal Tabs.
- Double-click on the first tab and type ‘Ticket Maintenance’.
- Press Tab.
- Double-click on the first tab and type ‘Company Maintenance’.
- Resize the tabs to accommodate the labels.
- Click on the Ticket Maintenance tab.
- In the Property Sheet, in the Navigation Target field, select ‘frmTicketMaintenance’.
- Click on the Company Maintenance tab.
- In the Property Sheet, in the Navigation Target field, select ‘frmCompanyTabular’.
- Name the form ‘frmNavigationForm’.
Disable the Navigation Pane
- From the File tab, click Options.
- On the Current Database page, scroll down to the Navigation section.
- Untick Display Navigation Pane.
- In the Application Options section, in the Display Form area, select ‘frmNavigationForm’ from the list.
- 00:04 So we're making pretty good progress on our ticket maintenance form.
- 00:08 But one thing you need to remember when you're working in access, is that so
- 00:13 far everything we've created, including the tables, the queries,
- 00:17 the forms, and the reports are all part of one act DB file.
- 00:21 So if I was sharing this database with other people,
- 00:24 when they open up the ACC DB file, they're going to have access to all of the tables,
- 00:30 all of the queries, all of the reports, and all of the forms.
- 00:34 And by using this navigation pane at the side,
- 00:36 they can access all of the information in these tables and make changes.
- 00:41 So the only field that we have locked down in this database is that ID field that we
- 00:46 protected earlier, pretty much everything else can be changed.
- 00:50 Now there is a better way to go about this if you want to have a bit more control.
- 00:55 If I take a look at everything that we've created, I can see that there
- 00:59 are only really two forms that I need people to enter information into.
- 01:04 That's the ticket maintenance form, and also the company maintenance form.
- 01:09 They might want to add new companies to this list.
- 01:13 Pretty much everything else is in the background it's what we use to
- 01:16 create these forms and interact with them.
- 01:19 So I don't want anybody to have access to anything other than ticket maintenance and
- 01:25 company maintenance.
- 01:26 So what I can do here is, I can effectively create two tabs on this page.
- 01:33 One that's going to house ticket maintenance, and
- 01:35 one that's going to house company maintenance.
- 01:37 To make it super easy for people to switch between the two forms, I can then
- 01:42 disable the entire navigation pane so they can't access any of the tables.
- 01:47 And this is actually a really simple thing to do, and it looks really effective.
- 01:52 So let's start out by creating our tabs, and
- 01:55 what we're essentially creating here is a navigation form.
- 01:58 So let's jump up to create and
- 02:00 in the forms group notice that we have a navigation drop down and
- 02:05 we have about six different types of tabs that we can add.
- 02:08 And I would recommend that you have a little play around with some of these
- 02:12 because they might work better for the database that you're creating.
- 02:16 Now we're going to keep things simple,
- 02:18 we're just going to create some horizontal tabs.
- 02:21 Now notice that's going to open up a new tab called navigation form, and
- 02:26 we have our first tab just here.
- 02:28 Now the reason why this tab is pink is because we changed our theme,
- 02:32 we're using an access to ion which has a purpley pink color scheme.
- 02:37 Now I actually don't really like that, so
- 02:40 i'm going to switch my theme back to office.
- 02:43 So now I can add my first tab, let's double-click, and
- 02:48 this one is going to house the ticket maintenance form.
- 02:53 Press Tab to move on to the next tab.
- 02:56 Double-click, this one is going to house the company maintenance form.
- 03:02 Press Tab again, now notice that both of these need to be widened out a little bit,
- 03:07 so we can simply do that by clicking on them and just dragging that border.
- 03:14 And that looks pretty good.
- 03:16 Don't worry about this Add new button on the end,
- 03:19 you won't actually see that when we're viewing the form.
- 03:22 So now that we have our two tabs, we need to set our navigation target.
- 03:27 And that basically means what form do we want to load when we click on these tabs.
- 03:31 So for ticket maintenance, if we open up the Property Sheet,
- 03:35 I can see that the first thing we need to do here is give our tab a name.
- 03:40 So i'm going to call this ticket, Maintenance Nav.
- 03:46 And the navigation target, well, if we click the drop down,
- 03:49 what do we want to load into here?
- 03:51 Well, the form ticket maintenance, and take a look at that,
- 03:55 it loads up really nicely.
- 03:57 Let's do the same for company maintenance.
- 04:00 I'm going to change the name of the button again to Company Maintenance nav.
- 04:08 And the navigation target name here is the company maintenance form.
- 04:13 Let's close the navigation form down.
- 04:15 Let's save the changes, and we're going to call this FRM.
- 04:22 Navigation form and click on OK.
- 04:26 So if we close down ticket maintenance,
- 04:28 let's double click to open up our navigation form and take a look at it.
- 04:32 Well, I think it looks pretty good.
- 04:33 If we click on ticket maintenance, we can see that company maintenance,
- 04:37 we can see that one as well.
- 04:39 And of course if you wanted to, you can customize the background color of these
- 04:43 tabs simply by going into design view and
- 04:46 adjusting the properties in the Property Sheet.
- 04:48 Now I will say I want to try and keep things consistent.
- 04:52 So i'm going to change some of the colors in the company maintenance form.
- 04:56 I just really want to make it look the same as what we have in ticket
- 04:59 maintenance.
- 05:00 So to do this, we need to change it on the actual company maintenance form.
- 05:06 So let's reopen that form, let's go into design view, and
- 05:10 let's start to make some changes.
- 05:12 So I want this background at the details area to be that light gray color,
- 05:17 so we're going to go to back color, click three dots and choose light gray.
- 05:23 Now this company's list area, I can see that this textbox that this is rather big,
- 05:28 it's covering up everything else.
- 05:30 So i'm going to make some adjustments here, let's move it up.
- 05:34 Because if I was to change the background of this company list heading as it is,
- 05:39 it would cover up the company field if we didn't resize this area.
- 05:43 So now the background we're going to change is the background color
- 05:47 to that purple color.
- 05:49 And the same thing for the background down here as well.
- 05:53 So three dots, and i'm going to choose from my recent colors, that lilac color.
- 05:59 Let's also change our font.
- 06:01 Now, you can use the ribbons to do this if you find it easier up to format, and we
- 06:06 can change it to white and also this field just here, we're going to change to white.
- 06:11 Let's see how that looks, let's go to form view.
- 06:14 Yep, that's pretty much how I want it to look.
- 06:17 Let's close down form company tabular, we're going to say Yes to
- 06:21 save the changes, and let's reopen the navigation form.
- 06:26 So now I can see that that looks a lot more consistent.
- 06:29 If somebody needs to add a new record to this company's list, they can simply click
- 06:33 the new record button at the bottom, and add in their new record.
- 06:37 Don't forget, if you would prefer to see this as a long list of companies,
- 06:42 you need to change the company maintenance form to continuous view.
- 06:46 So the final thing to do here is disable this navigation pane,
- 06:51 and we do this through access options.
- 06:54 So on the current database page if we scroll down to the navigation area,
- 06:59 all we need to do is deselect display navigation pane.
- 07:03 We also need to tell access what form we want to load on startup.
- 07:08 So up here in the display form area, which is currently set to none,
- 07:13 i'm going to say load up the navigation form, and let's click on Okay.
- 07:18 Now, in order to see these changes, we need to close our database and reopen it.
- 07:23 So let's close, let's reopen.
- 07:25 And when you take a look at that, it jumps straight into our navigation form.
- 07:30 And we don't have that navigation pane, but
- 07:33 we do have access to both of the forms that we need to maintain.
Lesson notes are only available for subscribers.