Download presentation
Presentation is loading. Please wait.
Published bySuzan Brooks Modified over 9 years ago
1
McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 5 Creating Custom Forms
2
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 2 McGraw-Hill/Irwin Objectives 1.Create a multiple-table form. 2.Enhance a form’s appearance. 3.Add a title to a form. 4.Create and use a subform. 5.Create and use calculated controls. 6.Add command buttons to a form. 7.Create page headers and footers. 8.Delete a form.
3
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 3 McGraw-Hill/Irwin Concepts 1.Alignment and Spacing - The position of controls on a form can be adjusted so that they are evenly aligned and so that the spacing between controls is the same. 2.Fonts - Fonts consist of three elements— typeface, size, and style—that can be applied to characters to improve their appearance. 3.Subform - A subform is a form that is embedded in another form that is used to show data from another table or query.
4
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 4 McGraw-Hill/Irwin Concepts 4.Calculated Control - A calculated control is used to display data that is calculated from a field in a table or query or from another control in the form. 5.Expression Builder - The Expression Builder is a built-in feature of Access used to enter expressions in database forms, reports, and queries. 6.Command Button - A command button executes one or more actions on a form.
5
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 5 McGraw-Hill/Irwin Outline Creating a Form for Multiple Tables –Removing Referential Integrity –Using the Form Wizard to Create a Multitable Form –Automatic Updating Across Tables
6
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 6 McGraw-Hill/Irwin Outline Customizing the form layout –Working in Form Design View –Rearranging Fields –Positioning Controls –Adding Label Controls –Changing Fonts –Adding Color and Shadows –Resizing Controls –Changing the Label Caption
7
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 7 McGraw-Hill/Irwin Outline Using Subforms –Creating a Subform –Modifying a Subform –Using Calculated Controls –Creating a Calculated Control –Setting Control Properties –Using the Expression Builder –Adding a Control Reference –Sizing and Positioning the Controls –Testing the Calculated Control
8
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 8 McGraw-Hill/Irwin Outline –Using the Expression Builder –Adding a Control Reference –Sizing and Positioning the Controls –Testing the Calculated Control
9
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 9 McGraw-Hill/Irwin Outline cont. Using Command Buttons –Creating Command Buttons –Using a Command Button –Creating Page Headers and Footers –Adding the Header and Footer Sections Creating a Border Line –Inserting Page Numbers
10
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 10 McGraw-Hill/Irwin Remove referential integrity, if necessary Use the Form Wizard Referential Integrity not enforced Creating a Form for Multiple Tables
11
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 11 McGraw-Hill/Irwin Using the Form Wizard
12
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 12 McGraw-Hill/Irwin Form
13
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 13 McGraw-Hill/Irwin Customizing the Form Layout
14
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 14 McGraw-Hill/Irwin Form Header –Optional section –Displays form title, instructions, or graphics –Appears at top of screen Detail Form Footer –Optional section –Displays notes, instructions, or grand totals –Appears at bottom of screen Working in Form Design View
15
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 15 McGraw-Hill/Irwin Toolbars Form Design Formatting Toolbox Toolbar
16
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 16 McGraw-Hill/Irwin Customizing Forms Rearrange fields Position controls
17
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 17 McGraw-Hill/Irwin Alignment –Left –Right –Top –Bottom Spacing –Equal –Increase or Decrease Concept 1: AL:IGNMENT AND SPACING
18
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 18 McGraw-Hill/Irwin Adding Label Control
19
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 19 McGraw-Hill/Irwin Typeface Set of characters with a specific design Types –Serif –Sans serif Font size –Height and width of the character –Measured in points Arial Times New Roman Courier New Concept 2: FONT
20
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 20 McGraw-Hill/Irwin Changing Fonts Font NameFont TypeFont Size ArialSans serif This is 10 pt. This is 16 pt. Courier NewSerif This is 10 pt. This is 16 pt. Times New RomanSerifThis is 10 pt. This is 16 pt.
21
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 21 McGraw-Hill/Irwin Changing Font Size Label control font size increased to 20 points
22
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 22 McGraw-Hill/Irwin Adding Color and Shadows
23
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 23 McGraw-Hill/Irwin Changing the Label Caption
24
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 24 McGraw-Hill/Irwin Form EnhancementsResizing the Photo Box
25
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 25 McGraw-Hill/Irwin Form that is embedded in another form Used to show data from another table or query Form/Subform combination called … –Hierarchical form –Master/detail form –Parent/child form When would you use a subform? Concept 3: SUBFORM
26
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 26 McGraw-Hill/Irwin More on Subforms Can be embedded within subforms Must be a pre-existing relationship between the main form and subform Can use the Control Wizards
27
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 27 McGraw-Hill/Irwin SubForm Wizard
28
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 28 McGraw-Hill/Irwin Subform Link to Main Form
29
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 29 McGraw-Hill/Irwin Completed Subform
30
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 30 McGraw-Hill/Irwin Used to display data that is calculated from a field Created from a text box Calculations are entered in the text control Begins with = Example: =[Price]*.50 Concept 4: CALCULATED CONTROL
31
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 31 McGraw-Hill/Irwin Calculated Control = Sum ([Quantity] * [Price]) Built-in Function Arithmetic Operator Identifier
32
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 32 McGraw-Hill/Irwin Setting Control Properties
33
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 33 McGraw-Hill/Irwin Helps you select the type of function and expression identifiers Consist of three sections –Expression box –Operator buttons –Expression elements Concept 5: EXPRESSION BUILDER
34
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 34 McGraw-Hill/Irwin Expression Builder
35
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 35 McGraw-Hill/Irwin Expression in Text Control
36
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 36 McGraw-Hill/Irwin Control Reference Control that references another control Calculated control in main form References calculated control in subform
37
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 37 McGraw-Hill/Irwin Executes one or more actions on a form Examples –Moving from record to record –Adding, copying, saving, printing, and deleting records –Opening another form Create your own or use from over 30 types of predefined procedures Concept 6: COMMAND BUTTON
38
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 38 McGraw-Hill/Irwin Command Button Wizard
39
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 39 McGraw-Hill/Irwin Add page headers and footers –Print on every page –Different from form headers and footers Choose View/Page/Header/Footer Creating Page Headers and Footers
40
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 40 McGraw-Hill/Irwin Inserting Page Numbers
41
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 41 McGraw-Hill/Irwin Working with Forms Preview Make adjustments Print Delete unwanted forms
42
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 42 McGraw-Hill/Irwin Key Terms Calculated Control - Control that displays data that is calculated from a field in a table or query or from another control in the form. Command Button - User created button that executes one or more actions on a form. Expression Builder - Access feature used to enter expressions in database forms, reports and queries. Fonts - Applied to characters to improved their appearance and made up of typeface, size, and style.
43
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 43 McGraw-Hill/Irwin Key Terms Formatting Toolbar - In Form and Report Design views, contains buttons used to customize the appearance of the form or report. Form Design Toolbar - Contains the standard buttons as well as buttons that are specific to the Form Design view window Form Design View - Used to create and modify the structure of the form. Hierarchical Form - A form/subform combination. Identifier - A part of an expression that refers to the value of a field, control, or property. Main Form - The primary form that can have multiple subforms. Master/Detail Form - A form/subform combination. Parent/Child Form - A form/subform combination.
44
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 44 McGraw-Hill/Irwin Key Terms Points - A measurement for the size of the printed characters. A 72-point character is 1-inch tall. The most common type sizes for text are 10 and 12 points. Property - Settings that affect how the control looks and acts Subform - A form that is embedded in another form. Toolbox Toolbar - Contains buttons that are used to add and modify controls. Typeface - The appearance and shape of characters, such as Times Roman and Courier. Type Size - The height or width of characters. Type Style - The special attributes assigned to characters, such as bold, italic, or underline.
45
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 45 McGraw-Hill/Irwin Discussion Questions 1.Discuss how multiple-form tables are used. When would it be more appropriate to use a subform as opposed to a multiple- form table? 2.Discuss the way a form’s appearance can be enhanced. Why would you use these enhancements? What drawbacks are there to using too many enhancements?
46
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 46 McGraw-Hill/Irwin Discussion Questions 4.Discuss the purpose of a calculated control. Give examples of the types of form fields where this feature would be most useful. 5.Discuss how command buttons can be used. What are some form functions that can be automated with a command button?
47
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 47 McGraw-Hill/Irwin Frequently Asked Questions Can referential integrity be removed? What is the easiest way to create a form? I don't see the form header and footer in my datasheet. Did I miss something? What features are on the Toolbox toolbar? The fields on my form are uneven and scattered. How can I make adjustments?
48
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 48 McGraw-Hill/Irwin Frequently Asked Questions I need more labels on a form. How can I add them? What is the difference between serif and sans serif fonts? I increased the font points for a label. Now it is too large for the placeholder. How does the Format/Size/To Fit feature work?
49
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 49 McGraw-Hill/Irwin Frequently Asked Questions What is the Properties dialog box? What is Form View? What is Design View? How can I show data from two tables in a form? How do I create a calculated control in an Access form?
50
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 50 McGraw-Hill/Irwin Frequently Asked Questions How do I use the Expression Builder? How can command buttons make my form easier to use? What are Page Headers and Page Footers? How do they differ from form header and footers?
51
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 51 McGraw-Hill/Irwin Web Links Official MS Access Web Site –http://www.mircosoft.com/accesshttp://www.mircosoft.com/access About: MS AccessTutorials –http://databases.about.com/cs/tutorials/http://databases.about.com/cs/tutorials/ The Access Web –http://www.mvps.org/access/http://www.mvps.org/access/
52
The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 52 McGraw-Hill/Irwin Web Links Exit Now: Access Tutorials –http://www.exitnow.com/skillbuilder/vie wlets/access.htmhttp://www.exitnow.com/skillbuilder/vie wlets/access.htm Microsoft Access Tutorials: Subforms –http://fisher.osu.edu/~muhanna_1/837/M SAccess/tutorials/subforms.pdfhttp://fisher.osu.edu/~muhanna_1/837/M SAccess/tutorials/subforms.pdf
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.