Locked lesson.
About this lesson
Make great looking forms by changing colors, creating a close button and sorting or filtering columns.
Exercise files
Download this lesson’s related exercise files.
Services_05_Start.accdb588 KB Services_05_end.accdb
596 KB
Quick reference
Access 05. Colors, Filter Data, Close Button
Application Terminology
Access Options
Access Options are a list of defaults for how Access will work that can be viewed and modified by choosing the File menu and then Options.
Asterisk *
In the record selector box, an asterisk * signifies a new record.
Back Color
Back Color is the property that controls the background color of an object.
Back Style
Back Style is whether that background of an object will be solid or transparent.
Cell
A cell, in a layout, is a distinct square which can contain information or be empty.
Builder Button
The Builder Button is displayed to the right of a property when a helper is available. Press Ctrl-F2 to launch the builder.
Button Tool
The Button Tool is in the Controls group on the Design ribbon and enables you to add command buttons to forms and reports.
Color Code
A 6 character code prefaced with # that specifies RGB (Red-Green-Blue) values. Each set of 2 characters represents a hex value from 00 (no color) to FF (all color). Color codes can be copied and pasted. Black is 000000. White is FFFFFF.
Combo Box
A combo box provides a convenient way to pick information from a list making the data more consistent and, therefore, more reliable.
Command Button
A Command Button, or Button, is a control that can make something happen when the user clicks on it such as Close a form.
Command Button Wizard
A set of guided questions that help you build a macro for a command button..
Current Database
Current Database is a set of Access defaults to specify information about the current database such as how the windows will appear, an Application Title, and what form will automatically display when the database is opened.
Default
A default is the standard way something will behave, or a standard value something will have unless changed.
Design View
The design view of an object allows you to change its definition.
Document Window Options
Document Window Options is a section of defaults for the Current Database that allows you to specify if you want windows to appear as Overlapping windows or Tabbed Documents.
Tabbed Documents
Tabbed Documents is the default choice for Document Window Options whereby each window takes all the working space and can be accessed using tabs across the top of the design space. In these lessons, this view is not being used.
Filter
Filter means to limit how many records will be displayed based on logical conditions.
Filter by Selection
Limit records displayed by applying logic based on the selected value.
Fore Color
Fore Color is the property that specifies the color of text.
Form Operations
Form Operations is a category of the Command Button Wizard specifying choices such as Close For, Open Form, and Print Form.
Layout
A layout is a pattern for objects on a form to line them up. Layouts are like tables with rows, columns, and cells.
Image Control
An area on a form or report that contains a picture.
Macro
An action or set or actions that can be carried out.
Multiple Users
Multiple Users means that more than one person is sharing and/or updating a database.
Navigation Pane
The Navigation Pane is an area on the left of the database window that enables you to open and design objects. It can be sorted and displayed by different categories. Object Type is the most common way to display objects in the Navigation Pane.
Name
A logical word to call something that can be recalled and used later.
Overlapping Windows
To see multiple windows at the same time, in the Access Defaults, choose:
File, Options, Current Database, Document window Options --> Overlapping Windows
Palette
A Palette is a visual example of colors to pick from. When choosing colors, if you want the color to change based on your Theme, choose a Theme color. If you want the color to be absolute, choose from Standard colors.
Pencil
In the record selector box, a pencil means there are changes to the record that have not been saved. Records are automatically saved unless you undo them.
Refresh
To refresh data in a table that was open when data was entered into it using a form (or by another user), choose Refresh All from the Home ribbon.
Record Selector Box
The record selector box is an area to the left of a record with indicators and the place to click to select a record.
Refresh
To refresh records to show all changes, including changes made by others in a multi-user application, choose Refresh All from the HOME ribbon.
RGB
RGB stands for Red-Green-Blue, the 3 primary colors to specify colors on a computer monitor.
Ruler
To select all the controls in a section, click and drag in the vertical (or horizontal) ruler.
Section Bar
Forms and reports have sections such as Header, Detail, and Footer. Section Bars are shown at the top of each section. To change properties for a section, you may click on the section bar to select it.
Shade Changer
When you click on the Custom tab of the Colors dialog box, you will see a triangle pointer that you can drag up and down to make the shade of a color lighter or darker.
Sort
Sort means to arrange data in a particular order.
Split Horizontally
Split Horizontally is an icon in the Merge/Split group of the Arrange ribbon and splits a selected cell into 2 halves.
Subform
A subform is a special use of a form that is contained on another form. Subforms can be synchronized with mainforms using LinkMasterFields and LinkChildFields.
Toggle Filter
Toggle Filter is an icon in the Sort & filter group of the Home ribbon that allows you to apply and remove a data filter.
Toggle Selection Status
to toggle the selection status of an object. If the object is selected, it will become de-selected and vice-versa.
Transparent
When something is transparent, you can see through it.
Shortcut Menu
A list of choices that appears when you right-click the mouse. Shortcut menus detect position and provide a list appropriate to what the mouse pointer is on or where the pointer is.
Steps
Turn on the Property Sheet
- Right-Click on the design surface
- Choose Properties from the shortcut menu to toggle the display of the Property Sheet on or off
- Alternately, you can press
(Alt-Enter)
Change Background Color of a Section
- Click on a section bar or a blank area of the section
- On the Property Sheet, click in the Back Color property.
- Choose the down arrow to select a Theme Color or the Builder Button to select a Standard Color.
- Alternately, you can right-click and choose Fill/Back Color from the shortcut menu to choose a Standard Color.
Change the Color Shade
- To change the shade of a color to lighter or darker, choose More Colors … from the bottom of the standard Colors palette.
- On the Custom tab, drag
up or down
Copy Color to another Property (of same Control or a Different One)
- To copy a color, click on a color property on the Property Sheet
- Select the Color Number (i.e.: #FCE6D4) and Copy
- Paste the Color Number into the property where you want it to be
Save a Record
- If you have made changes to a record, the filled triangle
will change to a pencil
in the record selector box.
- Click in the record selector box to save, or press
Move to Next Control
- To move to the next control (with Tab Stop set to Yes) in a form or Datasheet, press
Move to Previous Control
- To move to the previous control (with Tab Stop set to Yes) in a form or Datasheet, press
Copy Value from Previous Record
- To copy the value in a field from the previous record, press (Ctrl-')
Sort or Filter a Column
- In Datasheet View, click the down arrow in a column label to get a menu to sort or filter
Remove a Filter
- To remove a filter (or set Filter to last filter used), click the Toggle Filter icon on the HOME ribbon
- or click the Filtered/Unfiltered icon by the navigation controls in the lower left.
Create a Close Button Using the Command Button Wizard to make a Macro
- On the ribbon, click the Button tool
- Click on the Form where you want the button.
- A button of default size will appear and the Command Button Wizard pops up.
- Under Categories, choose Form Operations.
- Under Actions, choose Close Form.
- Click Next
- Choose Text (instead of picture), if desired (or pick a picture) to say Close.
- Click Next
- Change the Name property of the button to --> cmd_Close
- Click Finish
Open an Object listed in the Navigation Pane
- To open an object, double-click its name in the Navigation Pane
Split Cell in a Layout
- To split a cell in a layout, choose Split Horizontally or Split Vertically on the Arrange Ribbon tab of the design tools
Remove a Layout
- To remove a layout, choose Remove Layout on the Arrange Ribbon tab of the design tools
- 00:05 This is lesson 5 of Access 2013.
- 00:08 Hi, this is Crystal
- 00:10 We are going to continue changing the form
- 00:12 we started building in the last lesson.
- 00:15 We'll customize the form by changing colors,
- 00:18 learn how to filter for the data we want to see,
- 00:21 and make a Close button using a macro.
- 00:24 You will see how easy and fun it is
- 00:27 to make great-looking forms in Access
- 00:29 that do what you want.
- 00:32 Go to the Design View of the Services form
- 00:35 in your exercise file.
- 00:37 Turn on the Property Sheet if it is not showing.
- 00:40 You can right-click on almost anything in the design space and
- 00:44 choose Properties from the bottom of the shortcut menu.
- 00:48 Let's change the background color
- 00:51 of the form header and footer sections.
- 00:54 Click on the Form Header section bar to select it.
- 00:58 On the Property Sheet, click in the Back Color property.
- 01:01 When you are in the property, you see 2 things on the right,
- 01:05 a dropdown arrow and the builder button.
- 01:08 If you click on the dropdown arrow,
- 01:10 you will see a list of theme colors
- 01:12 which change when the theme changes.
- 01:14 I prefer to set my colors absolutely.
- 01:18 When you click on the Builder Button,
- 01:20 you will see a palette of theme and standard colors.
- 01:23 If you choose More Colors from the bottom,
- 01:26 there are 2 tabs.
- 01:28 The Standard tab shows a palette of many colors
- 01:31 with white to grays to black across the bottom.
- 01:35 The Custom tab gives you an area
- 01:37 where you can move a color picker around,
- 01:39 boxes to set Red, Green, and Blue values yourself,
- 01:43 and a shade changer to easily make colors lighter and darker.
- 01:47 The colored rectangles in the lower right
- 01:50 show the current color and what color you have picked.
- 01:53 Picking colors works the same way whether you are setting
- 01:56 a back color for a section or a fore color for a label.
- 02:00 With a dark back color, the text does not show up.
- 02:04 Choose all the controls in the form header
- 02:07 by clicking and dragging in the vertical ruler.
- 02:10 Since there is no text in an image control,
- 02:13 shift-click it OUT of the selection.
- 02:16 On the Property Sheet,
- 02:17 choose a light color for the Fore Color property.
- 02:21 As you pick colors, Access stores a code in the property.
- 02:26 You can copy and paste these color codes
- 02:29 I copy the Back Color property
- 02:31 from the form header to the form footer.
- 02:33 Now I select all the controls in the form footer section,
- 02:37 set the Fore Color to match those in the form header section,
- 02:40 and set the Back Style to be Transparent.
- 02:44 Transparent means that the back color of the section
- 02:47 will show through the control.
- 02:49 Save the form and look at the Form View.
- 02:52 If you want to enter a new record,
- 02:54 go to the bottom of the form.
- 02:57 Before you start typing anything,
- 02:59 notice the asterisk in the record selector box.
- 03:03 Drop the combo box and pick Plumbing for the Service Type.
- 03:06 Behind the scenes, Access is still storing a number.
- 03:10 Once you click in the new record and pick something,
- 03:13 a pencil appears.
- 03:15 This means there are changes to the record
- 03:17 that have not been saved.
- 03:20 For the Time Type, choose Hourly.
- 03:22 Combo boxes make it convenient to enter information
- 03:24 and since what you want is chosen from a list,
- 03:28 the data is more consistent,
- 03:30 which means it is also more reliable.
- 03:32 For the Service Name, enter Locate Main Tap
- 03:36 and for the Rate, enter 50.
- 03:38 Press TAB to move from one control to the next.
- 03:41 Since the Service Type is the same as the record above,
- 03:45 press Ctrl-Quote to copy the value.
- 03:47 Time Type is also the same.
- 03:50 The only thing changing for each of these records
- 03:53 is the service name.
- 03:55 Where is data stored?
- 03:56 The form is being used to view and edit data stored in tables.
- 04:01 Restore the Services form
- 04:03 to see the other windows that are open.
- 04:06 I am using Overlapping Windows,
- 04:08 which you can set in the Access Options.
- 04:11 Click the FILE menu, then Options, then Current Database.
- 04:16 Because the Services table was open when
- 04:18 we entered data into it using a form,
- 04:21 it is not showing the most recent changes.
- 04:24 This is also what happens when you have multiple users.
- 04:28 You can refresh the data to see changes
- 04:30 made by other users and other processes.
- 04:33 Click Refresh All from the Home ribbon
- 04:35 to see the 2 records we just entered.
- 04:38 When you are looking at information in a Datasheet View,
- 04:42 such as when you are looking at a table,
- 04:44 at the top of each column
- 04:46 to the right of the fieldname is a down arrow
- 04:48 you can use to sort and filter.
- 04:50 To see just the 2 Plumbing records we just put in,
- 04:53 click on the down arrow for service type,
- 04:56 uncheck Select All, and choose 4, which is Plumbing.
- 05:00 To remove the filter,
- 05:01 click on the Filtered indicator at the bottom
- 05:04 or Toggle filter in the Sort & Filter group of the Home ribbon.
- 05:08 Another way to filter is to right-click on the value
- 05:11 and choose how you want to filter from the shortcut menu.
- 05:15 In this case, I choose Equals 4.
- 05:17 This is called Filter By Selection
- 05:20 and works on Forms too.
- 05:22 Open the Services form.
- 05:23 Right-click on a value in the first column, Lawn Care.
- 05:27 Choose Does Not Equal "Lawn Care"
- 05:29 Do the same again and choose Does Not Equal "Electrical"
- 05:33 We are left with the 2 Plumbing records.
- 05:36 Note the filter indicators at the bottom and on the ribbon,
- 05:39 just like when we were looking at the Datasheet View.
- 05:42 Let's add a button to close the form.
- 05:44 To do this, we'll make a macro.
- 05:47 Go to the design view of the form.
- 05:50 On the ribbon, click the Button tool
- 05:52 Click on the Form where you want the button.
- 05:54 A button of default size will appear.
- 05:57 The Command Button Wizard pops up.
- 05:59 Under Categories, choose Form Operations.
- 06:03 Under Actions, choose Close Form.
- 06:05 Click Next
- 06:07 Choose Text (instead of picture) to say Close.
- 06:09 Click Next
- 06:11 Name the button --> cmd_Close
- 06:14 Click Finish
- 06:16 Let's move our Close button.
- 06:18 This form uses a layout.
- 06:20 Click the cell for the title, Services.
- 06:22 In the Arrange ribbon in Form Design Tools,
- 06:25 click Split Horizontally.
- 06:28 Click in the new right cell and split 2 more times.
- 06:32 Drag the button into one of the smaller cells.
- 06:35 Save the form.
- 06:36 Click Form View.
- 06:39 Let's try the Close button.
- 06:41 The form closes.
- 06:43 To open it again, double-click its name in the Navigation Pane.
- 06:46 As you can see, designing forms is easy
- 06:49 and sure does make it a lot nicer to enter data into Access.
- 06:53 In a later lesson, we will build a main form
- 06:56 and learn how to use the form we just built as a subform.
- 07:00 In the Next lesson, we will build a report
Lesson notes are only available for subscribers.