Locked lesson.
About this lesson
Adjust the properties of the form using the Property Sheet and Form Properties.
Exercise files
Download this lesson’s related exercise files.
7.02 form-properties - Exercise.docx43.4 KB 7.02 form-properties - Exercise solution.docx
107.3 KB TechGurusTicketing14.accdb
744 KB TechGurusTicketing14 - Complete.accdb
748 KB
Quick reference
Form Properties
Understand the difference between Form Properties and the Property Sheet.
When to use
We use Form Properties whenever we want to make a change to the overall look, feel, and behavior of the form as opposed to a specific field on the form.
Instructions
Form Design
- Right-click on the tab.
- Select Design View from the menu.
In Design View, each form has three sections: a header, details, and a footer.
The form header will be assigned a default name based on the name of the form. We can change this to make it more meaningful.
- Click in the form header.
An orange border will appear around the outside of any fields currently being edited.
- Type 'Companies List'.
The Property Sheet
Each part of a form can be customized using the Property Sheet. We can control the style, the formatting, and the behavior of each element.
- Click on the Company field in the Details section of the form.
- From the Form Design tab, in the Tools group, click Property Sheet.
Notice that the selection type for this field is Text Box. The Control Source is the field or table that will populate this field.
- Scroll down to Font Size.
- Change the font size to 18pts.
We can view any changes we make by switching back to Form View. Form View is how the form will be seen by the user.
- From the Home tab, in the Views group, click View.
- Select Form View.
The font will now display in 18pts.
Form Properties
- From the Home tab, in the Views group, click View.
- Select Design View.
- Click on the Company field.
- Right-click and select Form Properties.
Form Properties control the overall look and feel of the form as opposed to the individual fields. The Record Source will show the table that is in use in this form.
Changing the Sort Order
When we added 'Discover Inc' to our list of companies, it appeared out of sequence i.e. not in alphabetical order. We can force the form to always list the countries alphabetically by changing the sort order.
- From the Property Sheet, click the Data tab.
- In the Order By field, type 'Company'.
- From the Home tab, in the Views group, click View.
- Select Form View.
'Discover Inc' is now in the correct position in the list.
- Click in the last blank row.
- Add a new record for 'DataWorld'.
- Click Save.
- From the Home tab, in the Records group, click Refresh All.
The records are now sorted alphabetically.
Hints & tips
- Press ALT+Enter to open the Property Sheet.
- 00:04 In the previous lesson, we created our first form using the Form Wizard and
- 00:09 this form contains some very basic company information.
- 00:13 So what we're going to do now is we're going to switch into design view,
- 00:17 and we're going to take a look at some of the properties that we can modify.
- 00:21 So let's right click and jump into Design View.
- 00:26 Now you'll notice that over on the right hand side I have this Field List pane.
- 00:31 Now I don't actually need this Field List pane, so
- 00:34 let's close this down and take a look at the form in design view.
- 00:39 Now the form is made up of three different sections.
- 00:41 We have the Form Header, that contains the form name and the heading of company.
- 00:47 We then have the Detail, and this is what houses the records.
- 00:51 So in this case, the company records.
- 00:54 And then finally at the bottom we have a Form Footer.
- 00:57 And currently I'm not displaying any footer, so it's collapsed up.
- 01:02 Now if I want to change the name of this form, I can simply click.
- 01:07 I noticed that I get this orange border around the outside, so
- 01:11 that denotes the area essentially that you're editing.
- 01:15 So I'm going to change the form name to something a little bit more user friendly.
- 01:20 We're going to say Companies List and click away to set that.
- 01:25 Now it might be that I want to start to make some design changes to this form.
- 01:29 For example I might want to make the Companies List heading bold.
- 01:34 Maybe I want to make the actual records a different font or
- 01:38 a different size or maybe add a background color.
- 01:41 Or we can change all of the properties not only for
- 01:44 individual fields within our form, but also for the form itself.
- 01:49 Now if I click on the Company field just here,
- 01:52 notice that we have three new contextual ribbons when we're working in forms.
- 01:57 Form design, Arrange, and Format.
- 02:01 Now if we go to Form Design for one second,
- 02:04 over in this tools group we have a Property Sheet button.
- 02:08 And if I click this Property Sheet, notice the keyboard shortcut of Alt, Enter.
- 02:13 It's going to open up the properties for whichever item,
- 02:18 whichever element I'm clicked on, in this case, the Company field.
- 02:23 Now I can see over in the Property Sheet that this field type is a text box.
- 02:27 And if I click the drop-down,
- 02:29 these are the other parts of my form that I could select.
- 02:34 So if I was to select the FormHeader, it's going to move up to the top there.
- 02:38 If I select Detail, it's going to move to there.
- 02:42 Company_Label, it's going to move to there, and so on and so forth.
- 02:46 Now notice here, we've got something in here just called Label2, so
- 02:49 that's not particularly meaningful.
- 02:51 If I select Label2, I can see that it's this heading that we have up here.
- 02:56 And if we look at the form property, as it says, Caption, Companies List.
- 03:01 So, that is basically the title that I've just changed.
- 03:04 Now, I never like to leave these labels as the generic titles that access gives them.
- 03:09 So I'm going to give my label name,
- 03:12 I'm just going to say CompaniesHeading, something like that.
- 03:18 So now if I want to select it, it's a lot more meaningful in that drop-down area.
- 03:23 Now if we go back to the Company field, notice here the name.
- 03:26 This one doesn't have a label name, so
- 03:29 every element within your form can be customized.
- 03:32 Now when you're clicked on an individual element in your form,
- 03:36 you're modifying that element using these properties.
- 03:40 And we have so many properties for each element.
- 03:43 But if you want to modify the overall look and
- 03:46 feel of the form, you need to go into form properties instead.
- 03:50 Now there are a couple of different ways that you can get to it.
- 03:53 You could right click on your form and go to Form Properties.
- 03:59 Now all that really does in the Property Sheet is switch this drop-down from
- 04:04 whichever field you have selected to Form.
- 04:07 So this is the other way that you could do it, just select Form from here and
- 04:11 you're now modifying properties for the overall form.
- 04:14 Notice here that the form has a record source of tblCompany.
- 04:19 So the terminology that we use there is that this form is bound to the table,
- 04:25 tblCompany.
- 04:26 Now one thing I am going to do here is I'm going to select the records field again.
- 04:32 And I'm going to make the font size of each company record a little bit bigger.
- 04:38 So if I scroll down through this big long list,
- 04:41 finally I will find one for font size.
- 04:44 So currently the font size is 11, I'm going to put that up to 18.
- 04:49 Now you might find that when you make a change like this,
- 04:52 this kind of thing happens.
- 04:54 There's not enough room for each record.
- 04:57 So what we can do then is just do a little bit of moving around,
- 05:01 I can move the Form Footer down, and
- 05:03 then I can drag this text box down a little bit so it has a bit more room.
- 05:08 This is what you'll find with forms, there is a lot of fiddling around trying to get
- 05:12 things into the position that you want them to be in.
- 05:14 If you do make a change, remember you can always right click and
- 05:17 jump back into Form View to see what that's going to look like to the user.
- 05:21 So you can see here a couple of changes that we've made.
- 05:24 The title now says Companies List, and now those company names are a lot bigger.
- 05:29 Now take a look at that, previously, I added a new record on the bottom, but
- 05:34 it didn't automatically jump into the correct position.
- 05:37 But now I can see that it is in the correct position.
- 05:41 So let's go back into Design View.
- 05:45 And I'm going to choose Form, because if you want your fields to automatically jump
- 05:49 into the correct position, you can't change the property in here.
- 05:53 And the property you need is Order By.
- 05:58 So all we need to do in here is type in the field name
- 06:02 that we want to organize A to Z.
- 06:05 So for me the field name, Is company.
- 06:11 So let's test this out.
- 06:13 If we jump back into Form View,
- 06:16 I'm going to add another company at the bottom.
- 06:20 And this company is going to be called DataWorld.
- 06:24 And all we need to do to get that record to move into the correct position is go up
- 06:28 to the Home tab and click the Refresh button.
- 06:31 And because we're ordering alphabetically, it's going to make this list correct.
- 06:36 So the takeaways here, know the difference between form properties and
- 06:41 the property sheet.
- 06:42 And also remember that you can reorder your lists into alphabetical order by
- 06:47 adding the field name into the order by property.
Lesson notes are only available for subscribers.