Presentation on theme: "Collecting Data with Well-Designed Forms"— Presentation transcript:
1 Collecting Data with Well-Designed Forms Chapter 4Collecting Data with Well-Designed FormsUse the quote as a jumping off point for discussion, if desired.
2 Forms can show only one record at time Chapter IntroductionAutomate process of acquiring data needed for day-to-day operation of businessForms can show only one record at timeProvide many advantages to database usersFlexibility for users and designersConsist of one or many pagesDesign all forms in a database to create consistent look and feelInclude buttons that facilitate navigation
3 Level 1 Objectives: Developing Simple Forms to Facilitate Data Entry Design forms for efficient data entryCreate simple forms for data entry and editingDevelop a consistent user interface
6 Examining and Entering Data Enter data into records using:Table’s Datasheet viewForm that includes fields from one or more tablesMost Access database applications use forms for data entryAfter database released for regular business use
7 Creating Simple Forms for Data Entry and Editing Access provides many ways to create formsOptions for creating simple formsForm toolsForm wizard
8 Creating a Form Using the Form Tool Click the CREATE tab, then click the Form tool in the Forms groupAccess creates form by:Arranging all fields in table in columnar formatDisplays first record in form windowConverts subdatasheet into subform
9 Creating a Form Using the Form Tool (cont’d.) Move from one field to nextSwitch to Form view and press the Tab keyMove from one record to anotherClick buttons on record navigation bar at bottom of main formData in subform changes
10 Using the Form WizardSpecify field orderSpecify particular layout and style for formClick the Forms Wizard button in the Forms group on the CREATE tab
14 Using the Form Wizard (cont’d.) Record sourceUnderlying objectProvides fields and data in formBound formDisplays data from fields in its record sourceUnbound formDo not have record sourceUsually used to help users navigate
15 Types of ControlsBound forms or controls have an associated record source which is the underlying object that provides the fields and data for the control.Unbound forms and controls do not have a record source - they aren't directly related to any data. They might be navigation tools, etc.
16 Form Views Form View (Default) Layout View Design View Shows a form with data from underlying tableData can be edited but layout can'tLayout ViewAllows some modification to the layout while seeing the data displayed in the formCan't change dataDesign ViewFull control of layout
17 Using design elements called controls Form ControlsUsing design elements called controlsSmall objects such as text boxes, buttons, and labels
18 Form ControlsSelect: Selects objects including ink, shapes and text areas; especially useful for objects behind text. Text Box: Displays a label attached to a text box that is bound to a field in an underlying table or query or contains a calculated value Label: Displays text, such as titles or instructions; an unbound control.
19 Form ControlsButton: Creates a control that users can click to take an action, such as record navigation or form and record operations Tab Control: Creates a series of tab pages on a form. Each tab page can contain a number of other controls that display information from another table or query.
20 Form ControlsHyperlink: Creates a link to a Webpage, program, or address. Web Browser Control: Allows you to use Web pages to a form. Navigation Control: Allows you to add an additional navigation tab in a navigation.
21 Form ControlsOption Group: Groups toggle buttons, option buttons, or check boxes so the user can only select one item per group. Insert Page Break: Add or removes a page break between the pages of a multipage form.
22 Form ControlsCombo Box: Creates a combo box control that contains a list of potential values form the control and lets you type text or select a table or query as the source of values in the list. You can also use the combo box to find a record. List Box: Creates a list of values for the control either by typing values or specifying a table or query for the source.
23 Form ControlsCombo Box: Creates a combo box control that contains a list of potential values form the control and lets you type text or select a table or query as the source of values in the list. You can also use the combo box to find a record. Chart: Inserts a chart into a form to display data graphically. Line: Draws a line to enhance the appearance of the form.
24 Form ControlsToggle Button: Displays a toggle button control bound to a yes/no field. Similar to a check box. List Box: Creates a list of values for the control either by typing values or specifying a table or query for the source. Rectangle: Draws a rectangle to enhance the form's appearance. Check box: creates a control that holds on/off, yes/no, or true/false data.
25 Form ControlsUnbound Object Frame: Adds an object from antoher application such as Excel. The object becomes part of the form, not part of the underlying data. Use this for adding pictures, sounds, charts, or slides to the form. Attachment: Inserts and attachment control in the form design grid which allows you to attach and view multiple files stored in the underlying field. Option Button: Display an option button bound to a yes/no field.
26 Form ControlsSubform/Subreport: Embeds another form in the current form. If the forms have a related field, Access maintains the link between them. Bound Object Frame: Creates a bound OLE object stored in an Access database table such as a picture stored in an OLE Object data type field. Image: Displays a static graphic image on the form which becomes part of the form, not part of the underlying data.
27 Figure 4.10: Form for the tblCustomer in Design view
28 Using the Form Wizard (cont’d.) Form headerDisplays information that always appears on form even when records changeTop of screenForm footerDisplays information that always appears on formBottom of screenOften containsInstructions for using formButtons to perform actions
29 Using the Form Wizard (cont’d.) Page headers and footersDisplay information at top or bottom of every pageAppear only when printing form by defaultHeadersUseful for column headings dates, and page numbersFootersDisplay summaries and page numbersGridForm background
30 Examining a Form in Design view Design view Detail sectionFields have two partsLabelText boxMove and sizing handlesAdjust to where data fits
31 Developing a Consistent User Interface Forms in database share same designPresent consistent user interfaceUsers learn how to use forms onceApply what they learn to all forms in databaseAccess Themes are simple way to make forms and reports appear more professionalBorders, background colors, shading and graphic effects applied to entire form
32 Developing a Consistent User Interface (cont’d.) Click Design Tab on the Ribbon and click Themes button in Themes groupScroll down gallery and select themeClick in Form header, click Format tab, Shape FillChange colors using the Shape Fill menu of colors
33 Changing Label Properties in a Form Select label box to changeRight click label and click Form PropertiesProperty sheet opensSelect property to modify the appearance and behavior of the label
34 Adding an Unbound Graphic Resize form header in Design view so image will fitTo add a logoClick the FORM DESIGN TOOLS DESIGN tabClick Logo button in Header/Footer groupInsert desired graphicUse size mode property Clip option for best fill of image
35 Introduction to Reports Reflect the information in the databaseSummarize business activitiesProvide details about your dataUse reports to format data in an attractive and informative layout for printingOften based on data in multiple tables
36 Understanding Reports Presents information from one or more database tablesPrinted formatProvides most options and advantages for printing database contentOrganize and format information to create professional presentationInclude numeric and textual dataMaintain flexibility when displaying summary information
37 Understanding Reports (cont'd.) Accomplish goals with reportsCreate printed copy of information used regularlyDistribute information to othersCustomize organization and appearance of printed informationGroup or summarize information forReporting to othersCalculating running totalsGroup totalsGrand totalsPercentages of totals
39 Choosing the Appropriate Type of Report Determine report purpose and audienceBefore developingReport typesDetailedGroupedSummaryMailing labelsMultiple-columnTypes of reports can contain other reportsCalled subreports
40 Creating and Modifying Basic Reports Report buttonCreate report that displays all fields and records in single table or queryReport WizardGuides you through steps of creating reportBased on one or more tables or queriesAsks questions aboutRecord sourcesFieldsLayoutFormat
41 Creating a Report Using the Report Button In the Navigation Pane, click the table on which you want to base the reportClick the CREATE tab, click the Report button in the Reports group. Access creates a report that includes all the fields from the record sourceSave the reportNaming reportsUse rpt prefixChoose meaningful name
43 Creating a Report Using the Report Wizard Provides quick way to select only fields you want to display in reportBased on one or more tables or queriesSelect one of several layouts and styles for reportCreate report with Report WizardCustomize report in Design viewProvides options for selecting fields
44 Creating a Report Using the Report Wizard (cont'd.) PagesFieldsGroupingSortingLayout and orientation
45 Modifying a Report in Design View Can create reports from scratch in Design viewControlSmall object such as text boxDisplays data or line to separate recordsModify report in Layout and Design viewSwitch to Print Preview to see effects of changes
46 Forms provide easy to use interface Level 1 SummaryForms provide easy to use interfaceNormally used in production databases to access/edit dataReports reflect and summarize the data in the underlying tables/queries. Does not allow data to be edited.Create usingForm or Report ToolForm or Report Wizard
47 Level 2 Objectives: Creating Forms that Use Fields From More than One Table Create multitable formsImprove navigation on formsAdd controls to forms
48 Adding a Subform to an Existing Form Form embedded in another formPrimary formCalled main formUnderlying table usually has one-to-many relationship with table underlying subformMain form and subform linkedSubform displays only records that related to current record in main form
49 Adding a Subform to an Existing Form (cont’d.) Use Wizard to create subformAccess automatically synchronizes main form with subformOnly if tables containing fields for form relatedSubform must also have field with same name or compatible data type and field size as primary key in table underlying main formMain form can have more than one subformSubform can also contain another subform
50 Modifying the Form Layout Can move and resize controls, including subformClick right edge of form to get two headed arrowDrag to make form widerTo widen the subformClick borderSizing handles appearPoint to the middle-right handlePointer changes to a double-sided arrowThen drag the subform border
51 Modifying the Form Layout (cont’d.) Select other controls to move text box and attached label togetherLabelsMove with text field or independentlyEdit textResize
52 Creating a Form from a Query User viewCustom form that shows only fields particular user wantsMight or might not be used for data entryIn some cases fields may be locked so all user can only view them and not edit themUse Form Wizard to create form based on queryAccess asks which table to view results by
53 Creating a Form from a Query (cont’d.) Prevent editingSet form properties to NoAllow editsAllow deletionsAllow additionsData entry
54 Adding Command Buttons to a Form Users click to perform common tasksAccess provides collection of command buttonsAssociated with actionsCan containTextStandard icons available from AccessGraphics
55 Adding Command Buttons to a Form (cont’d.) Create in Design viewUsing Command Button WizardBy adding button to form then setting propertiesBe consistent when creating command buttonsLocation on formOrder
57 Exploring Other Form Properties Open property sheet for formRight-click the item you wish to modify the properties forClick Properties on shortcut menuCommon reason to use form propertiesDecide to base form on different record source from one used to create form
60 Controlling Form Printing Control form’s vertical spacing on printed pageInclude date and page numberUsing Access-provided functions
61 Printing a Selected Record in Form view Print Preview buttonPreview formSee how it will print
62 Add subform to existing form Modify form layout Create form from query Level 2 SummaryAdd subform to existing formModify form layoutCreate form from queryCreate command buttonsModify form propertiesPrint formUse print preview
63 Level 3 Objectives: Creating Forms for Completing Daily Business Tasks Improve usability of formsPlace calculations on formsDevelop advanced forms
64 Improving the Usability of Forms Use form controlsSpeed up process of locating particular recordInclude calculated control in formCreate multiple-page formsCreate forms with multiple subformsLearn about tab orderControl focus in form to skip unbound controls
65 Locating a Record Quickly Find toolOpen Find and Replace dialog boxClick field to search for particular valueEnter value to matchAccess searches for records that contain same value in selected fieldCombo boxDisplays list of valuesUsers select one from list
67 Locating a Record Quickly (cont’d.) Use Control Wizard to add combo box to formCombo Box WizardProvides three options for listing values in combo boxLook up values in table or queryLet users type valueLet users select value that Access matches to find record
68 Adding a Calculation to a Form Include calculated field on formCreate field in queryUse query as record source for formOr add an unbound control that contains calculation directly to formCreate unbound controlText box buttonEnter calculation
69 Streamlining the Main Pharmacy Processes in a Complex Form Process analysisList steps and substeps employees performIndicate which database objects used to complete each task
70 Step 1: Registering New Customers or Confirming Customer Identity Usually completed by technicianUses Command Button Wizard to add two command buttons to open associated forms
71 Step 2: Filling and Refilling Prescriptions Started by techniciansPharmacist must check forDrug interactionsConfirm instructions and dosages
72 Creating Forms with Many Subforms Arrange fields in logical groupsAccording to how employees most often use themClick Subform/Subreport buttonStart Subform WizardPrevent data errorsChange properties of subform so it does not allow edits, deletions, or additions
73 Figure 4.41: Completed frmPrimaryActivity form with three subforms
74 Creating Multipage Forms Using Page Break Too many fields to fit on one screenContinue a form onto an additional page (or pages) by placing a page breakPage Up or Page Down key moves you from page to page
75 Creating Forms Using Tab Controls for Multiple Subforms Add multiple subforms to form in compact wayEach subform has tab at topLayered one on top of otherAdd first tab by clicking Tab Control buttonAdd additional tabs byRight-clicking blank spot in tab controlClicking insert page
77 Changing Tab Order and Tab Stop Form created with form tool or Form WizardPlaces fields in order they appear in table designAfter fields rearranged for more logical data entryForm needs modification to arrange order of movement through fieldsCalled tab orderTest each form byOpening formPressing Tab key to see if cursor stops in each field in appropriate order
78 Add calculations to forms Create forms with multiple subforms Level 3 SummaryLocate records usingFind toolCombo boxAdd calculations to formsCreate forms with multiple subformsSet tab orderAfter modifying field order on form
79 Forms provide easy to use interface Create using Wizards Chapter SummaryForms provide easy to use interfaceCreate using WizardsUse subforms to display related dataCreate form from queryCreate command buttonsCreate forms that display large amount of dataMultiple subformsMultiple pages