access2003m4_a5t

Upload: fahim-ullah-shagiwal

Post on 04-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 access2003m4_a5t

    1/97

    M O D U L E 4

    Microsoft Access 2003

    Com ple teVI SUALTM

    Step- by -s t ep Ser iesCompu te r T r a in ing Manua lwww.computertrainingmanual.com

    THE COMPLETE

  • 7/29/2019 access2003m4_a5t

    2/97

    Microsoft

    Acc ess 2003 Module 4

    Copyright Notice

    Copyright 2003 EBook Publishing. All rights reserved. No part of this publication may be reproduced, transmitted, or

    translated into any language, in any form or by any means, electronically or mechanical, including photocopying,recording, storage in a database or retrieval system, or otherwise, without the prior written permission of EBookPublishing.

    DisclaimerWe take great care to ensure the accuracy of these materials; however, EBook Publishing makes no warranty, express orimplies, including without limitation any warranty concerning the adequacy, accuracy or completeness of such informationor material or the results to be obtained from using such information or material. EBook Publishing reserves the right torevise this publication and to make changes in its content at any time, without obligation to notify any person or entity ofsuch revisions or changes.

  • 7/29/2019 access2003m4_a5t

    3/97

    Microsoft

    Acc ess 2003 Module 4

    HOW TO USE THIS MANUAL

    The Com ple teVI SUALTM step-by-step computer training manual is specially

    developedand organized based on the I ns t r uc t i ona l Des ign concepts , to ensurethe effectiveness of the learning process.

    Most of the tasks in each chapter fit into a single page for easy reference. Most

    tasks are summarized to l e ss t han 10 key s t eps and accompanied by ac tua lsc r een i l l us t r a t i ons. Every step you go through is practical and relevant. All

    chapters are i ndependen t . No exercise files need to be installed prior to thetraining, so you can start training from the modules that best suit you or your

    trainees. However, the module sequence that we suggest is designed to optimizeyour computer learning process.

    Chapter introduction.Each chapter begins with apresentation and illustrationto prepare you for theconcepts you will learn.

    Chapter name. Eachchapter is an independentlearning unit. No exercisefiles need to be installedprior to the training. Thislets you start your traininganywhere or anytime youlike.

    Section name. Eachsection groups relatedchapters to make sure youlearn all the related featuresand skills in completedetails.

  • 7/29/2019 access2003m4_a5t

    4/97

    Microsoft

    Acc ess 2003 Module 4

    HOW TO USE THIS MANUAL

    Instructions You are asked toClick File >> Save. Click File to expand the file menu from the menu bar, then

    click the Save command from this menu.

    Press + Hold down the Shift key while pressing the Tab key on thekeyboard.

    TypePhoto from Kevin Jeff. Type the phrase Photo from Kevin Jeff.

    Appropriate tips, tricks,and shortcutsthat you mayfind useful are included to further

    enhance your skills.

    Handy summary. Eachtask concludes with asummary that reinforces thekey steps in the task. It alsoserves as a cue card for as ecific task.

    Detailed descriptionsand explanationsoneach step help you to learnmore about the step that youhave just performed.

    Actual screenillustrations such as thedialog boxes and the resultoutcomes are displayed toshow you how they appearon screen. This helps youto learn visually andeffectively.

    A rectangle or circle is usedto draw your attention to thepart of the illustration thatyou are dealing with.

    Visual step-by-stepinstructions take youthrough hands-on activitiesto accomplish each task.These instructional actionsappear in bold.

    The important commands orkeywords are highlighted inthis font and style.

    The text that you need totype in appears in this fontand styles such.

    Task Name. Each task consists of a series of fullyillustrated step-by-step instructions, which help youthrough the hands-on activities.

  • 7/29/2019 access2003m4_a5t

    5/97

    2003 ComputerTrainingManual.com

    5

    Microsoft

    Acc ess 2003 Module 4

    TABLE OF CONTENTS

    CREATING ADVANCED FORMS....................................................................7Creating And Customizing Effective Forms ...........................................................................8How To Create A Form Using The Form Wizard..............................................................11How To View A Form Design............................................................................................13How to Show / Hide The Field List....................................................................................13How to Show / Hide The Toolbox .....................................................................................13How To Resize A Form Control ........................................................................................14How To Reposition Controls And Labels ..........................................................................15How To Move A Control And A Label Separately.............................................................16How To Delete A Field Control .........................................................................................16How To Add A Field Control .............................................................................................17How To Control The Cursor Using The Tab Order Feature..............................................18How To Change the Control Properties............................................................................20How To Change The Properties Of A Form......................................................................21

    How To Select Multiple Controls.......................................................................................23How To Make The Form Header/Footer Visible ...............................................................24

    Creating Powerful And User Friendly Controls On A Form................................................25How To Create A Form From Scratch ..............................................................................28How To Create A Header And Footer............................................................................... 29How To Insert A Label ......................................................................................................30How To Format Text Properties........................................................................................31How To Change The Background Color Of A Form .........................................................32How To Apply Special Effects...........................................................................................33How To Change The Background Image Of A Form........................................................34How To Add A Text Box Field Control ..............................................................................35How To Add An Unbound Text Box Control .....................................................................36How To Rename A Control And Its Label .........................................................................37How To Insert A Function Into A Control ..........................................................................38How To Insert A Calculated Control..................................................................................39How To Insert An Option Group Control........................................................................... 40How To Insert A Combo Box Control................................................................................43How To Insert A List Box Control......................................................................................45How To Insert Command Button.......................................................................................47How To Use Windows XP Themes...................................................................................49

    Integrating The Main Form And Subforms ...........................................................................50How To Create A Subform................................................................................................51How To Create A Main Form ............................................................................................52How To Integrate A Subform Into The Main Form............................................................53How To Hide Record Navigation Buttons In A Subform ...................................................55How To Hide Field Information In A Subform ...................................................................56How To Change The Size Of A Subform..........................................................................57

    CREATING ADVANCED REPORTS.............................................................. 58Working With Report Sections............................................................................................... 59

    How To Create A Report Using The Wizard .....................................................................63How To Reorganize Labels And Controls In Sections......................................................67How To Insert A Calculated Control..................................................................................69How To Change The Format Of A Control .......................................................................70

    Customizing Report Sections ................................................................................................71

  • 7/29/2019 access2003m4_a5t

    6/97

    2003 ComputerTrainingManual.com

    6

    Microsoft

    Acc ess 2003 Module 4

    TABLE OF CONTENTS

    How To Create A Report From Scratch............................................................................73How To Insert Header And Footer Sections .....................................................................74How To Insert Group Header And Footer Sections..........................................................75How To Insert Controls And Labels Into Sections ............................................................76How To Customize The Format Of A Control ...................................................................77How To Change The Properties Of A Group ....................................................................78How To Change The Properties Of A Section ..................................................................79How To Insert Analytical Values Into Sections .................................................................80How To Insert Page Numbers...........................................................................................81

    Creating A Chart Report .........................................................................................................82How To Create A Chart Report Using The Wizard ...........................................................83How To Select The Chart Type And Layout .....................................................................84

    AUTOMATING A DATABASE WITH MACROS ............................................86Working With Macros..............................................................................................................87How To Create A Macro ...................................................................................................88

    How To Run A Macro........................................................................................................89How To Edit And Rename A Macro..................................................................................90How To Group Macros......................................................................................................91How To Insert A Button To Run A Macro .........................................................................92How To Filter A Record Using A Macro ............................................................................94How To Create A Conditional Macro ................................................................................96How To Secure A Database With An Autoexec Macro.....................................................97

  • 7/29/2019 access2003m4_a5t

    7/97

    2003 ComputerTrainingManual.com

    7

    Creat ing

    Advanced

    Fo r ms

    Object ives :W hen you h ave com p le t ed t hese

    lessons , you w i l l be ab le t o :

    Create a form using the wizard

    Show/hide field lists and the toolbox

    Customize form designs

    Insert and delete controls

    Change controls and form properties

    Add multiple control types

    Make a form header/footer visible

    Create a form from scratch

    Create a form header and footer

    Apply special effects

    Change the background image of aform

    Add a bound text box control

    Add an unbound text box control

    Create a formula in a control

    Create calculated controls

    Add an option group

    Add a combo box

    Add a list box

    Add a useful command button

    Create a main form and subform

    Integrate the main and subform

    Hide information in a subform

    Resize the subform

  • 7/29/2019 access2003m4_a5t

    8/97

    2003 ComputerTrainingManual.com

    8

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    Crea t ing And Cus tom iz ing Ef fec t i ve Form s

    A form is an interface to let you view information from tables or queries. You also useforms to enter data into tables.

    Forms make your database easy to use and view. You can arrange all the informationin a record to be displayed on a single screen, whereas you have to scroll the screen ifyou read directly from the table datasheet. You are able to design your form to the wayyou like so you can view the data quickly and effectively.

    A form displays OLE object fields like photos but this data is not visible in the tabledatasheet view.

    Forms enable you to retrieve data from multiple tables or queries. You can alsoenter data into multiple tables. Your database users no longer need to search for thetables to view or enter the information.

    TableDatasheetView.Displaysrecords directlyfrom tabledatasheet.

    Form View.Displaying recordsin the form makeyour database

    easier to use andview.

  • 7/29/2019 access2003m4_a5t

    9/97

    2003 ComputerTrainingManual.com

    9

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    All the information on a form or report is contained in controls. On data access pages,information is contained in controls in the same way as it is on forms and reports.However, information can also be typed directly on the data access page.

    You are able to change the design of the form. You can delete the existing controls,add more controls, move or resize the controls. In order to customize or change theform design, you have to open the form in design view.

    Show Toolbox buttonClick to show/hide Toolbox.

    Show Field List button

    Click to show/hide Field List.

    Field ListShows all fields indata source table.Drag and drop thefield to place onto

    form.

    Data Source Table Name

    ToolboxShows tools to designyour form.

    ControlObject that contains data or runs actions.E.g. Field is known as control on form.

    Form Design ViewShows you the layoutof the form so you can

    customize it.

  • 7/29/2019 access2003m4_a5t

    10/97

    2003 ComputerTrainingManual.com

    10

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    Create a new database. Then, import all the tables from the Northwind.mdb database.

    Depending on your setup, the Northwind database should be in the C:\ProgramsFiles\Microsoft Office\Office11\Samples folder.

  • 7/29/2019 access2003m4_a5t

    11/97

    2003 ComputerTrainingManual.com

    11

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Create A

    Form Using TheForm Wizard

    1. From the Object Bar,click the Formsbutton.

    2. Double-click Createform by usingwizard.

    3. In the Table/Queries

    box, select the tableyou want to use.

    4. Click to set allthe fields for the form.

    5. Click the Next buttonand select formlayout.

    6. Click the Next buttonand select the formstyle.

    7. Click the Next buttonand type in the formname.

    8. Click the Finishbutton.

    1. From the Object Bar, click the Forms button. Double-click Create form by using wizard.The Form Wizard dialog box appears.

    2. In the Table/Queries box, click the Employees table.The Employee table fields are displayed.

    3. Click to select all the fields for the new form.All the fields are sent into the Selected Fields box.

    4. Click the Next button.A dialog box appears to determine the layout of your form.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    12/97

    2003 ComputerTrainingManual.com

    12

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    5. Click the Columnar option button.You can choose other layouts and see the layout preview on the left.

    6. Click the Next button. Click the Industrial style.A dialog box appears to determine the style of your form.

    7. Click the Next button. Type All Employees as the formname.The default name is the table name: Employees.

    8. Select the Open the form to view or enter informationoption. Then, click the Finish button.The All Employees form is displayed.

  • 7/29/2019 access2003m4_a5t

    13/97

    2003 ComputerTrainingManual.com

    13

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To View AForm Design

    1. Select the form fromthe DatabaseWindow.

    2. Click theDesign button.

    3. Click the Field

    List button to displaythe Field List.

    4. Click theToolbox button todisplay the Toolbox.

    If the form is alreadyopen in form view, click

    the Design viewbutton on the Databasetoolbar to switch toDesign View.

    1. Select the All Employeesform from the DatabaseWindow.Make sure you are in the form view.

    2. Click the Design button.The design of the form is displayed as shown below.

    .

    How to Show /Hide The FieldList

    3. Click the Field List button to display the Field List.This is a toggle button. Clicking the button again will hide the Field List.

    How to Show /

    Hide TheToolbox

    4. Click the Toolbox button to display the Toolbox.This is a toggle button. Clicking the button again will hide the Toolbox.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    14/97

    2003 ComputerTrainingManual.com

    14

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Resize AForm Control

    1. Open the form inDesign View.

    2. Click the control toselect it.

    3. Drag the resizehandle.

    1. Open the All Employees form in Design View. Clickthe Notes control.Handles appear at the edges of the Notes control.

    2. Drag the bottom Resize Handle up.The bottom resize handle is circled below.

    The mouse pointer changes to when it is positioned at the resize handle.

    3. Release the mouse.The control is resized.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    15/97

    2003 ComputerTrainingManual.com

    15

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How ToRepositionControls AndLabels

    1. Open the form inDesign View.

    2. Click the control.3. Position the mouse

    pointer over theborder of the control.

    4. Drag the control tothe new location.

    5. Release the mouse.

    1. Open the All Employees form in Design View. Clickthe Reports To control.Make sure you open All Employees form in Design View.

    2. Position the mouse pointer over the border of thecontrol.The pointer changes to as shown below.

    3. Drag the control up.A thin line appears to indicate the new location of the label and the control.

    4. Release the mouse.Both the control and the label are relocated.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    16/97

    2003 ComputerTrainingManual.com

    16

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Move A

    Control And ALabel Separately

    1. Open the form inDesign View.

    2. Click the control.3. Position the mouse

    on the upper lefthandle of the control.

    4. Drag the handle.

    5. Release the mouse.

    1. Position the mouse at the upper left handle of thecontrol.You will move only the control, not the label. This handle determines theposition of the control while the handle on the upper left of the label determinesthe label position. The pointer changes to when it is positioned at the handle.

    2. Drag the control down to the left.A thin line appears to indicate the new position of the control

    3. Release the mouse.The control is relocated.

    How To Delete AField Control

    1. Open the form inDesign View.

    2. Click the control.3. Press .

    1. Open the All Employees form in Design View.

    2. Click the Report To control.You will delete the Report To control.

    3. Press .The control is now deleted.

    SUMMARY

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    17/97

    2003 ComputerTrainingManual.com

    17

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Add A

    Field Control

    1. From the Field Listbox, drag the controlonto the form.

    2. Release the mouse.

    4. From the Field List box, click the Reports To field.Click to show the Field List if it does not appear on screen.

    5. Drag the Reports To field from the Field List to theform.To drag multiple fields, select the fields using the key before draggingthem into the form.

    6. Release the mouse.The field is added onto the form.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    18/97

    2003 ComputerTrainingManual.com

    18

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Control

    The CursorUsing The TabOrder Feature

    1. Click View >> TabOrder.

    2. Click the field rowselector.

    3. Drag and drop the

    rows to rearrange thetab order.4. Click the OK button.

    The tab order determines the order in which you advance from

    one field to the next field when you press the key. Theinitial tab order is set according to the order of the creation ofthe fields on the form, not the position of the fields (controls).If you have rearranged the controls, you should change thetab order so it reflects the order in which the fields appear.

    1. Switch the positions of the LastName and FirstNamecontrols in the Design view as shown below.You can switch to form view and press the key to observe the cursormovement in the `LastName and `FirstName controls.

    2. From the menu, click View >> Tab Order.The design of the form is displayed as shown below.

    .

    3. Click the LastNamerow selector.The LastName row is highlighted.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    19/97

    2003 ComputerTrainingManual.com

    19

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    You can also click theAuto Order button toautomatically reset theorder according to theposition of the newfields that appear onthe form.

    4. Drag and drop the LastName row below the FirstNamerow.Make sure you drag the row selector. The new order is shown below.

    . .

    5. Click the OK button.The new tab order is set. Switch to Form View and press the key to seeif the cursor moves to the `FirstName control, then to the `LastName control.

    T IP S

  • 7/29/2019 access2003m4_a5t

    20/97

    2003 ComputerTrainingManual.com

    20

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Changethe ControlProperties

    1. Click thePropertiesbutton.

    2. Click the controlwhich you want toview the properties of.

    You can also double-click the control to openthe related propertiesdialog box.

    1. Open the All Employees form in Design view. Clickthe Properties button.The properties dialog box appears as shown below.

    2. Click the EmployeeID control.The properties dialog box is updated to show the related properties.

    Tabs Description

    Format Determines the appearance of the control on theform.

    Data Determines data source, default value and

    validation rules.

    Event Sets actions by assigning macros or visual basicprocedures to the control.

    Other Like determines controls name, whether tabbinginto control is allowed, message on status bar etc.

    All Displays all the properties of the control.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    21/97

    2003 ComputerTrainingManual.com

    21

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To ChangeThe PropertiesOf A Form

    1. Open the form inDesign View.

    2. Click theDesignbutton.

    3. Open the Properties

    dialog box.4. In the Properties

    dialog box, click theobject down-arrowand click Form.

    5. Change theproperties settings inthe dialog box.

    1. Select the All Employeesform from the DatabaseWindow. Click the Design button.The All Employees form opens in Design View.

    2. Open the Properties dialog box.Click the properties button on the toolbar.

    3. In the Properties dialog box, click the object down-arrow and click Form.The form properties appear in the Form dialog box.

    4. In the Caption box, type All Employees.The form title displays All Employees instead of Employees.

    5. In the Default View box, click Continuous Forms.The form is set to Continuous Forms as the default form display style.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    22/97

    2003 ComputerTrainingManual.com

    22

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    6. Switch to the Form View.Note that the title of the form has changed and the forms appear continuously,as shown below

  • 7/29/2019 access2003m4_a5t

    23/97

    2003 ComputerTrainingManual.com

    23

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To SelectMultipleControls

    1. Open the form inDesign view.

    2. Click and drag themouse pointer todraw an outline over

    the controls you wantto select.

    You can also hold the key and clickthe controls to selectmultiple controls.

    You can change thecontrol propertiessimultaneously if youselect multiple controls.

    1. Open the All Employees form in Design View. Clickand drag the mouse pointer over the Country,HomePhone and Extension controls.A thin outline appears while you drag the mouse. All controls falls within theoutline are selected automatically.Important: Please drag from the blank area of the form, or else you may end upselecting only the object where you click.

    The controls are selected as shown below.

    2. Click the EmployeeID control.You will select two non-adjacent controls. The EmployeeID control is selected,as shown below.

    3. Hold down , and then click the LastNamecontrol.Both controls are selected as shown below.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    24/97

    2003 ComputerTrainingManual.com

    24

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To MakeThe FormHeader/FooterVisible

    1. Open the form inDesign View.

    2. Drag the borderlinebelow the Form

    Header bar down toset the height for theForm Header.

    3. Type in text or createa control in the FormHeader section.

    You can also type intext into the Headersection using thelabel tool or changethe header section

    background color.

    Use the sametechnique for yourForm Footer.

    1. Open the All Employees form in Design View.Position the mouse pointer over the borderline belowthe Form Header bar.The pointer changes to a double-headed arrow, as shown below.

    2. Drag down to set the height of the header.The Form Header section appears.

    .

    3. Drag and Drop the EmployeeID control onto the FormHeader area.The EmployeeID appears on the form header.

    4. Switch to the Form view.The form appears with the header as shown below.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    25/97

    2003 ComputerTrainingManual.com

    25

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    Crea t in g Pow er fu l And User Fr iend ly Con t ro ls On A

    Form

    You can move, resize, or set the format properties of a control. You can also addcontrols to display calculated values, totals, the current date and time, and other usefulinformation on a form.

    Controls are objects on a form, report, or data access page that display data, performactions, or are used for decoration. For example, you can use a text box on a form,report, or data access page to display data, a command button on a form to openanother form or report; or a line or rectangle to separate and group controls to makethem more readable.

    You should create a user-friendly form to help or assist your users in entering data.Access 2003 provides a set of handy tools for you to accomplish this. You can alsocontrol the appearance of the data displayed on the form with the tools. The following isa list of the tools in the toolbox that can help you to customize your form.

    Tools Description

    Select ObjectsSelects a control, section, form, report, or data access page. Clickthis tool to unlock a toolbox button that you've locked down.

    Control WizardsTurns control wizards on or off. Use control wizards to help youcreate a control, such as a list box or command button. In a form,additional wizards are available for a combo box, option group,

    subreport, and subform. And in a data access page, you can use awizard to create a drop-down list box or a Microsoft Office chart.To use wizards to create a control, the Control Wizards buttonmust be pressed in. You cannot use wizards in a stand-alonepage, and you cannot use them when you point a page to adatabase other than the database currently open.

    Label Displays descriptive text, such as a title, a caption, or instructionson a form, report, or data access page. Labels on forms andreports can contain hyperlinks, but hyperlinks in a report won'twork when viewed in Microsoft Access; hyperlinks will work whenyou output the report to Microsoft Word, Microsoft Excel, or toHTML format. Access automatically attaches labels to the controlsyou create.

    Text Box Used to display, enter, or edit data in the underlying record sourceof a form, report, or data access page, display the results of acalculation, or accept input from a user.

  • 7/29/2019 access2003m4_a5t

    26/97

    2003 ComputerTrainingManual.com

    26

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    Tools Description

    Option GroupUsed along with check boxes, option buttons, or toggle buttons todisplay a set of alternative values. For example, you can use anoption group to specify whether an order is shipped by air, sea, orland. In a data access page, an option group can contain onlyoption buttons.

    Toggle ButtonUsed as a stand-alone control bound to a Yes/No field in aMicrosoft Access database or a Bit column in a Microsoft Accessproject. The toggle button is an unbound control for accepting userinput in a custom dialog box or in part of an option group.

    Option ButtonUsed as a stand-alone control bound to a Yes/No field in aMicrosoft Access database or a Bit column in a Microsoft Access

    project. The option button is an unbound control for accepting userinput in a custom dialog box or in part of an option group.

    Check Box Used as a stand-alone control bound to a Yes/No field in aMicrosoft Access database or a Bit column in a Microsoft Accessproject. The check box is an unbound control for accepting userinput in a custom dialog box or in part of an option group.

    Combo BoxCombines the features of a list box and a text box. You can type inthe text box or select an entry in the list box to add a value to anunderlying field.

    List Box Displays a scrollable list of values. When a form is open in Formview or when a data access page is open in Page view or Microsoft

    Internet Explorer, you can select from the list to enter a value into anew record or to change the value in an existing record.

    Command Button Used to perform actions, such as finding a record, printing a record,or applying a form filter.

    ImageUsed for displaying a static picture on a form or report. Because astatic picture is not an OLE object, you can't edit the image insideMicrosoft Access after you've added it to a form or report.

    Unbound ObjectFrame

    Used to display an unbound OLE object, such as a Microsoft Excelspreadsheet, on a form or report. The object remains constant asyou move from record to record.

    Bound Object

    Frame

    Used to display OLE objects, such as a series of pictures, on a form

    or report. This control is for objects stored in a field in the form's orreport's underlying record source. A different object appears on theform or report as you move from record to record.

    Page BreakUsed to begin a new screen on a form, a new page on a printedform, or a new page of a report.

  • 7/29/2019 access2003m4_a5t

    27/97

    2003 ComputerTrainingManual.com

    27

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    Tools Description

    Tab ControlUsed to create a tabbed form with several pages (such as theemployee form in Northwind) or tabbed dialog box (such as theOptions dialog box on the Tools menu). You can copy or add othercontrols onto a tab control. Right-click on the Tab control in thedesign grid to modify the number of pages, the page order, theselected page's properties, and the selected tab control properties.

    Subform/Subreport Used to display data from more than one table on a form or report.

    LineUsed on a form, report, or data access page to emphasize relatedor especially important information or to divide a form or page intodifferent sections, for example.

    Rectangle Used for graphic effects, such as grouping a set of related controls,or used for emphasizing important data on a form, report, or dataaccess page.

    More ControlsDisplays other toolboxes and OLE objects.

  • 7/29/2019 access2003m4_a5t

    28/97

    2003 ComputerTrainingManual.com

    28

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Create A

    Form FromScratch

    1. Click the Newform button.

    2. In the New Formdialog box, clickDesign View.

    3. Select the record

    source.4. Click the OK button.

    If you have forgotten toselect the recordsource. You canspecify the source inForm Properties. (Inthe Data tab, specifythe source in the recordsource box.)

    1. From the Object bar, click Forms. Click theNewbutton.The New Form dialog box appears.

    2. In the list box, click Design View. In the drop-downbox, click the Employees table.This specifies that the record source for the form comes from the Employeestable.

    3. Click the OK button.A blank form is created as shown below.

    4. Save the form as New Employee.

    .

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    29/97

    2003 ComputerTrainingManual.com

    29

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Create AHeader AndFooter

    1. Open the form inDesign View.

    2. Click View >> FormHeader/Footer.

    1. Open the New Employeeform in Design View.The initial blank form does not have the header / footer section.

    2. From the menu, click View >> Form Header/Footer.The form header and footer sections are created, as shown below.

    .

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    30/97

    2003 ComputerTrainingManual.com

    30

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Insert ALabel

    1. Open the form inDesign View.

    2. Click the Labelbutton on the toolbox.

    3. Click where you wantto place the text.

    4. Type the text.

    If the toolbox is not

    visible, click theToolbox button on thetoolbar.

    1. Open the New Employee form in Design View. Clickthe Label button on the toolbox.This enables you to place text or labels on your form.

    2. Click in the header section.The label insertion cursor is placed in the header.

    3. Type EmployeeForm.You will be changing the text format later.

    4. Switch to the Form View.The text appears in the form header section.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    31/97

    2003 ComputerTrainingManual.com

    31

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Format

    Text Properties

    1. Open the form inDesign View.

    2. Select the object.

    3. Click theProperties button onthe toolbar.

    4. Click the Format tab.5. Change the

    properties settings.

    You can double-clickany object on the formto open its propertiesdialog box.

    If you want to enlargethe label object on theform, drag the resizehandles around theobject, or double-click

    any resize handlearound the object toauto fit the object.

    1. Open the New Employeeform in Design View. In theForm Header, click the Employee Form label.The label is selected

    .

    2. Click the Properties button on the toolbar.The Label properties dialog box appears as shown below.

    3. Click the Format tab. Scroll down and change theFore Color, Font Name and Font Size, as shownbelow.The fore color is the text color, represented by a code. Click the fore color box,

    then click to select the color. Select blue to see the following color code.

    .

    4. Enlarge the Header section. Then enlarge the labelobject.You have to enlarge it to see the entire label.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    32/97

    2003 ComputerTrainingManual.com

    32

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Change

    The BackgroundColor Of A Form

    1. Open the form inDesign View.

    2. Double-click theheader background.

    3. Click the Format tab.4. In the Back Color

    box, change the

    settings.5. Click the OK button.

    1. Open the New Employee form in Design View.Double-click the header background.The Form Header properties dialog box appears.

    2. Click the Format tab. In the Back Color box, clickand then select yellow as the color for thebackground.The Color palette dialog box appears for you to select the color.

    3. Click the OK button.The code for yellow appears in the Back Color box.

    .

    The header background color changes to yellow.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    33/97

    2003 ComputerTrainingManual.com

    33

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To ApplySpecial Effects

    1. Open the form inDesign View.

    2. Double-click theobject.

    3. Click the Format tab.

    4. In the Special Effectbox, select the optionyou want.

    There are six specialeffects in Access 2003. Flat

    Raised

    Sunken

    Etched Shadowed

    Chiseled.

    1. Open the New Employeeform in Design View. In theForm Header, double-click the Employee Form label.The Label properties dialog box appears.

    2. Click the Format tab. Click the Special Effect drop-down arrow, and then select Raised.The effect is applied to the selected label immediately.

    Click on the toolbar to see the form in Form View.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    34/97

    2003 ComputerTrainingManual.com

    34

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To ChangeThe BackgroundImage Of A Form

    1. Open the form inDesign View.

    2. Open the Formproperties.

    3. Click the Format tab.

    4. In the Picture box,select the new image.5. In the Picture Tiling

    box, click Yes.

    1. Open the New Employeeform in Design View. Openthe Formproperties.In the Form properties dialog box, click the drop-down arrow and select Formfrom the list, as shown below.

    2. Click the Format tab. In the Picture box, locate the fileSanta Fe Stucco.bmp. Click the Picture Tiling drop-down arrow, then select Yes.The Santa Fe Stucco.bmp image is found in the Windows folder. You will tile thesmall image to fill the entire form background.

    The form appears as below in form view. Delete the image from the Picture boxto remove the background picture before you continue.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    35/97

    2003 ComputerTrainingManual.com

    35

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Add AText Box FieldControl

    1. Open the form inDesign View.

    2. Drag the field fromthe filed list to the

    form design.

    1. Open the New Employeeform in Design View. Dragthe BirthDate field onto the form Detail section.If you do not see the field list, click the Field list button on the toolbar.

    2. Switch to Form View to see the control.The form now shows the following data.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    36/97

    2003 ComputerTrainingManual.com

    36

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Add AnUnbound TextBox Control

    1. Open the form inDesign View.

    2. Click the TextBox button in thetoolbox.

    3. Click the positionwhere you want toplace the unboundtext box.

    The label may varyfrom what you see onyour screen. It is just adefault name that youcan change later.

    1. Open the New Employeeform in Design View. Clickthe Text Box button in the toolbox.Make sure the Text Box button is highlighted.

    2. Move the mouse below the BirthDate control in theDetail section and click once.The unbound text box is created as shown below. This control does not retrievefrom or enter data to any table.

    3. Switch to Form View to see the control.The form shows the following data.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    37/97

    2003 ComputerTrainingManual.com

    37

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Rename

    A Control AndIts Label

    1. Open the form indesign view.

    2. Open the propertiesdialog box for thecontrol.

    3. Click the All tab.4. In the Name box,

    type the new name.5. Double-click the label

    text. In the Captionbox, type the newlabel text.

    1. Open the New Employeeform in Design View.Double-click the Unbound text box control.The Text Box properties dialog box appears.

    2. Click the All tab.All the text box properties are displayed in the dialog box.

    3. In the Name box, type CurrentDate.The control name changes.

    4. Double-click the label text. From the Properties dialogbox, in the Caption box, type Current Date:.This is to change the label for the text box.

    5. Switch to Form View to see the control.If you do not see the entire label, enlarge the label object in design view.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    38/97

    2003 ComputerTrainingManual.com

    38

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Insert AFunction Into AControl

    1. Open the form inDesign View.

    2. Click the control.3. Type in the formula.

    You can also create aformula for the controlby typing the formuladirectly into the ControlSource box.

    1. Open the New Employeesform in Design View. Clickthe CurrentDate control to select it.Make sure you click the text box, not the label.

    2. Type =Now(). Then, press .This formula displays the computer current date and time.

    Open the CurrentDate control properties box; the formula automatically appears

    in the Control Source box.

    In the Format box, select the Short Date format, as shown below.

    3. Switch to Form View to see the control.The form shows the following data. Your Current Date will be different from the

    one shown below.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    39/97

    2003 ComputerTrainingManual.com

    39

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Insert ACalculatedControl

    1. Open the form inDesign View.

    2. Click the TextBox button on thetoolbox.

    3. Click the position youwant to place thecontrol.

    4. Type in the formula.5. Press .

    1. Open the New Employeeform in Design View. Clickthe Text Box button on the toolbox.Make sure the Text Box button is locked.

    2. Click below the CurrentDate control.A new unbound text box is created as shown below.

    3. Type=([CurrentDate]-[BirthDate])/365and press.The square brackets certain field/control names. This formula will find thedifference in days between the birth date and the current date. This formula is

    then divided by 365 days to get the age of the employee.

    The form appears as shown below in the form view.

    4. Change the formatand label for the control as shownbelow.Tip: Format: Standard, Decimal Places: 0

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    40/97

    2003 ComputerTrainingManual.com

    40

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Insert

    An OptionGroup Control

    1. Open the form inDesign View.

    2. Click the OptionGroup button on thetoolbox.

    3. Drag the field from

    the field list onto theform.4. Type in the label

    names.5. Click the Next button

    and select defaultvalue.

    6. Click the Next buttonand change theoption values.

    7. Click the Next buttonand select the datadestination.

    8. Click the Next buttonand select the typeand style of the optioncontrol.

    9. Click the Next button,change the label andclick the Finishbutton.

    Make sure theControl Wizardsbutton on the toolbox ishighlighted; otherwisethe option group toolwill not lead you to thewizard steps shown in

    this task.

    1. Open the New Employeesform in Design View. Click

    the Option Group button on the toolbox.This enables you to create a control that provides options for users to select onyour form.

    2. Drag the Country field from the field list onto the form.The Option Group Wizard dialog box appears.

    3. Under Label Names, type USA, UKandCanada.This is where you specify the list of countries in the option group control.

    4. Click the Next button. Click the No, I dont want adefault option button.Choose the default value from the list if you want the value to be set to thecountry field every time you create a new record using this form.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    41/97

    2003 ComputerTrainingManual.com

    41

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    5. Click the Next button.The country names are represented by numbers, as shown below. Change thevalues if necessary.

    6. Click the Next button.The values entered by users will be kept in the Country field in the table.

    7. Click the Next button.You can select the type and style of the control here.

  • 7/29/2019 access2003m4_a5t

    42/97

    2003 ComputerTrainingManual.com

    42

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    You can reposition orformat the option groupelements in the formdesign view. You canalso change the valuesby changing the radiobutton properties.

    8. Click the Next button. Click the Finish button.The final step is to confirm the label that appears for the option group.

    The option group appears in the Form Design View, as shown below.

    The option group appears in the Form View, as shown below.

    T IP S

  • 7/29/2019 access2003m4_a5t

    43/97

    2003 ComputerTrainingManual.com

    43

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Insert A

    Combo BoxControl

    1. Open the form inDesign View.

    2. Click the ComboBox button on thetoolbox.

    3. Drag the field from

    the field list onto theform.4. Select where to get

    the values from.5. Follow the

    instructions in thecombo Box Wizardand click the Nextbuttons to go throughthe process.

    6. Click the Finishbutton.

    The wizard dialogboxes may vary whenyou select differentoptions in the wizards.

    1. Open the New Employeesform in Design View. Click

    the Combo Box button in the toolbox.You will create a drop-down list box on your form. Make sure the ControlWizards button on the toolbox is highlighted.

    2. Drag the Country field from the field list onto the form.The Combo Box Wizard appears.

    3. Click the I will type in the values that I want optionbutton.The first and the third options are self-explanatory.

    4. Click the Next button and type USA, UK and Canada asshown below.Press the key to move to the next row.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    44/97

    2003 ComputerTrainingManual.com

    44

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    5. Click the Next button.Here is where you specify the location you want to store the value.

    6. Click the Next button.Type Country as the label name if necessary.

    7. Click the Finish button.The control appears in the form design view as shown below.

    The combo box appears as shown below in the form view.

  • 7/29/2019 access2003m4_a5t

    45/97

    2003 ComputerTrainingManual.com

    45

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Insert A

    List Box Control

    1. Open the form inDesign View.

    2. Click the ListBox button in thetoolbox.

    3. Drag the field fromthe field list onto theform.

    4. Select where to getthe values.

    5. Follow theinstructions in the ListBox Wizard and clickthe Next buttons toproceed through thesteps.

    6. Click the Finishbutton.

    The wizard dialog

    boxes may vary whenyou select differentoptions in the wizards.

    1. Open the New Employeesform in Design View. Clickthe List Box button in the toolbox.You will create a list box on your form. Make sure the Control Wizards button onthe toolbox is highlighted.

    2. Drag the Country field from the field list onto the form.The List Box Wizard appears.

    3. Click the I will type in the values that I want optionbutton.The first and the third options are self-explanatory.

    4. Click the Next button and type USA, UK and Canada asshown below.Press the key to move to the next row.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    46/97

    2003 ComputerTrainingManual.com

    46

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    5. Click the Next button.This is where you specify where you want to store the value.

    6. Click the Next button.Type Country as the label name if necessary.

    7. Click the Finish button.The control appears in the form design view and the form view as shown below.You can resize the list box to save space on the form. If the option list exceedsthe size of the box, scroll bars appear automatically to let you scroll through thelist.

  • 7/29/2019 access2003m4_a5t

    47/97

    2003 ComputerTrainingManual.com

    47

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Insert

    CommandButton

    1. Open the form inDesign View.

    2. Click theCommand Button inthe toolbox.

    3. Click where you want

    to place thecommand button.4. Select the

    Categories andActions for the button.

    5. Click the Next buttonand select thebuttons appearance.

    6. Click the Next buttonand name the button.

    7. Click the Finishbutton.

    1. Open the New Employeesform in Design View. Clickthe Command Button in the toolbox.You will create a command button on your form. Make sure the Control Wizardsbutton in the toolbox is highlighted.

    2. Click on the form where you want to place thecommand button.The Command Button Wizard appears.

    3. In the Actions box, click Go To Last Record.These are the Access 2003 built-in command buttons that enables you to carryout simple actions.

    4. Click the Next button.This is where you can specify the appearance of the button.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    48/97

    2003 ComputerTrainingManual.com

    48

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    5. Click the Next button. In the text box, typeLastRecord.A meaningful name will help you to refer to the button later.

    6. Click the Finish button.The command button appears in the form view as shown below. You can resizethe command button in design view to save space on the form.

    When you click the button, the last record appears

  • 7/29/2019 access2003m4_a5t

    49/97

    2003 ComputerTrainingManual.com

    49

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To UseWindows XPThemes

    1. Click Tools >>Options.

    2. Click theForms/Reports tab.

    3. Select the Use

    Windows ThemedControls on Formscheck box.

    4. Click the OK button.

    1. From the menu, click Tools >> Options.The Options dialog box appears.

    2. Click the Forms/Reports tab. Select the Use WindowsThemed Controls on Forms check box.Access applies the selected Windows Theme to views, dialog boxes andcontrols.

    3. Click the OK button.The dialog box closes.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    50/97

    2003 ComputerTrainingManual.com

    50

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    I n t eg ra t i ng The Ma in Fo rm And Sub fo rm s

    When a form is inserted in another form, the primary form is called the main form, andthe form within the form is called the subform. A form/subform combination is alsocalled a hierarchical form, a master/detail form, or a parent/child form.

    Subforms are especially effective when you want to show data from tables or querieswith a one-to-many relationship. For example, you could create a form with a subformto show data from the Orders table and the Order Details table. The data in the Orderstable is the "one" side of the relationship. The data in the Order Details table is the"many" side of the relationship each order can have multiple order details.

    Form View

    Design View

    Orders Form(main form)The one side ofthe relationship.

    Order Details Form(subform)The many side of therelationship. Containsmultiple records.

  • 7/29/2019 access2003m4_a5t

    51/97

    2003 ComputerTrainingManual.com

    51

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Create A

    Subform

    1. Double-click Createform by usingwizard in thedatabase window.

    2. Select fields from thetables to be shown inthe subform.

    3. Click Next and select

    the subform layout.4. Continue to click theNext button until youreach the end of thewizard.

    Normally the subform isdisplayed in theDatasheet Layout;however, you can alsoselect other layouts.

    1. From the Database Window, double-click Create formby using wizard.The Form Wizard dialog box appears.

    2. Select all fields from the Table: Order Details asshown below.

    3. Click the Next button and click the Datasheet layout.The subform will be displayed in datasheet format.

    4. Click the Next buttontwice and click the Finish button.Then close the form.

    The subform is now created. It is just an ordinary form before you integrate itinto the main form.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    52/97

    2003 ComputerTrainingManual.com

    52

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Create AMain Form

    1. Double-click Createform by usingwizard in thedatabase window.

    2. Select fields from the

    tables to be shown inthe main form.3. Click the Next button

    and select the mainform layout.

    4. Click the Next buttonand select the mainform style.

    5. Continue until the endof the wizard.

    1. In the Database Window, double-click Create form byusing wizard.The Form Wizard dialog box appears.

    2. Select OrderID and OrderDate from Table: Order asshown below.You are going to create a simple order form with only this information.

    3. Click the Next button and select the Columnar layout.Click the Next button and select the Industrial style.You can select another layout or style if you want.

    4. Click the Finish button.The main form is created with the default name Orders. It is just an ordinaryform before you integrate it to with the subform.You need to enlarge the form to accommodate the subform. Resize the mainform in design view by dragging the form border on the right and the borderabove the Form Footer bar.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    53/97

    2003 ComputerTrainingManual.com

    53

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How ToIntegrate ASubform IntoThe Main Form

    1. Open form in DesignView.

    2. Click the

    Subform/Subreportbutton in the toolbox.3. Click the position on

    the form where youwant to place thesubform.

    4. Click the Use anexisting form optionbutton and select thesubform you want.

    5. Click the Next buttonto go through theremaining steps.

    6. Click the Finishbutton.

    The integrated subformmay not look perfectwhen you first integrateit to the main form.Most of the time youhave to adjust andmake modifications tothe subform manually.

    1. Open the Orders form (the main form) in Design View.Click the Subform/Subreport button on thetoolbox.You want to insert a subform into your main form.

    2. Click below the Order Date control.The Subform Wizard dialog box appears.

    3. Click the Use an existing form option button and clickthe Order Details form from the list. Then click theNext button.Select the first option if you have not created the subform.

    4. Click the Next button.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    54/97

    2003 ComputerTrainingManual.com

    54

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    5. Click the Next button. Then click the Finish button.The subform is integrated into the main form as shown below.

    Click the Form View to see how it is displayed. You will notice that there are afew things in the subform that need to be improved.1. The subform area is too small to display the entire subform details.2. Confusing record navigation buttons, as there are two sets of recordnavigation buttons, one for the subform and one for the main form.3. Redundant OrderID information in subform as the main form already showsthe OrderID.

  • 7/29/2019 access2003m4_a5t

    55/97

    2003 ComputerTrainingManual.com

    55

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To HideRecordNavigationButtons In ASubform

    1. Open the subform inDesign View.

    2. Show the formproperties.3. In the Navigation

    Buttons box, selectNo.

    4. Click the Save button.

    1. Open the Order Details form (the subform) in DesignView. Show the Form properties dialog box.You can also double-click the form selector button on the upper left corner of theform window to show the Form properties dialog box.

    2. In the Navigation Buttons box, select No.The navigation buttons will be hidden when you display the form in Form View.

    3. Click the Save button. Then, click the Datasheetbutton to see the effects.The record navigator buttons are hidden.

    Withnavigationbuttons

    Without

    navigationbuttons

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    56/97

    2003 ComputerTrainingManual.com

    56

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To Hide

    FieldInformation In ASubform

    1. Open the subform inDatasheet View.

    2. Right-click the columnheading of the fieldyou want to hide.

    3. Click Hide Columnsfrom the shortcutmenu.

    4. Click the Save button.

    You can also use thedatasheet view tochange column widthso that the subformcolumns fit in the mainform.

    1. Open the Order Details form (the subform) inDatasheet View.Just double-click the form, as the default view for the form is datasheet. Thedatasheet appears, as shown below.

    2. Right-click the Order ID column heading.The shortcut menu appears, as shown below.

    3. Click Hide Columns from the shortcut menu.The Order ID column is hidden.

    4. Click the Save button.The new structure of the subform is saved.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    57/97

    2003 ComputerTrainingManual.com

    57

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED FORMS

    How To ChangeThe Size Of ASubform

    1. Open the main formin Design View.

    2. Click the subformobject.

    3. Drag the resize

    handles to adjust thesubform object size.4. Click the Save button.

    1. Open the Orders form (the main form) in Design View.Click the subform object.Resize handles appear around the subform object.

    2. Drag the resize handle circled below to the right toenlarge the width of the subform.The pointer changes to a double-headed arrow when it is placed on the resizehandle.

    3. Switch to the Form View to see if the subform showsall the details in full.You may have to try adjusting the width a couple of times.

    4. Click the Save button.The form is saved.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    58/97

    2003 ComputerTrainingManual.com

    58

    Creat ing

    Advanced

    Repor t s

    Object ives :W hen you h ave com p le t ed t hese

    lessons , you w i l l be ab le t o :

    Create reports using the wizard

    Adjust labels and controls in sections

    Add calculated controls

    Format controls

    Create a report from scratch

    Create header and footer sections in areport

    Create group header and footersections

    Add controls and labels into sections

    Change group properties

    Change section properties

    Add analytical values to sections Add page numbers

    Create a chart report

    Select the chart type and layout

  • 7/29/2019 access2003m4_a5t

    59/97

    2003 ComputerTrainingManual.com

    59

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    Wor k ing W i th Repo r t Sec t i ons

    A Report is one of the types of output of your database. Although you can print therecords directly from a table, a query or a form, reports are used to produce a moreflexible and professional hard copy output. You are able to control what should bedisplayed in the report header/footer, page header/footer, group header/footer and thedetails of the report.

    PageHeader

    Page

    ReportFooter

    ReportHeader

    Group

    Detail

  • 7/29/2019 access2003m4_a5t

    60/97

    2003 ComputerTrainingManual.com

    60

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    Sections Description

    Report Header Labels/controls in this section appear only at the beginning of the report.(Top of the first page of the report). E.g. Title of the report.

    Report Footer Labels/controls in this section appear only at the beginning of the report.(Right after the last record in the report). Normally this is used to summarizethe report data. E.g. Grand Total of the Numeric Data.

    Page Header Labels/controls in this section appear at the top of each page of the report.E.g. Record Column Headings.

    Page Footer Labels/controls in this section appear at the bottom of each page of thereport. E.g. Page numbering.

    Group Header Used to display Labels/controls to indicate the group name at the beginningof each group of records.

    Group Footer Used to display Labels/controls that summarize the group numeric data atthe end of each group of records. E.g. Total for each group.

    Details Used to display the actual data for each individual record.

    The following useful tool, found in the toolbox in the report Design View, allow for you toadd controls into the sections and change the appearance of your reports.

    Tools Description

    Select ObjectsTo select a control, section, form, report, or data access page.Click this tool to unlock a toolbox button that you've locked down.

    Control WizardsTurns control wizards on or off. Use control wizards to help youcreate a control, such as a list box or command button. In a form,additional wizards are available for a combo box, option group,subreport, and subform. And in a data access page, you can use awizard to create a drop-down list box or a Microsoft Office chart.To use wizards to create a control, the Control Wizards buttonmust be pressed in. You cannot use any wizards in a stand-alonepage, and you cannot use them when you point a page to adatabase other than the database currently open.

    Label A control that displays descriptive text, such as a title, a caption, orinstructions on a form, report, or data access page. Labels onforms and reports can contain hyperlinks, but hyperlinks in a report

    won't work when viewed in Microsoft Access; hyperlinks will workwhen you output the report to Microsoft Word, Microsoft Excel, orto HTML format. Access automatically attaches labels to thecontrols you create.

    Text Box Used to display, enter, or edit data in the underlying record sourceof a form, report, or data access page, display the results of acalculation, or accept input from a user.

  • 7/29/2019 access2003m4_a5t

    61/97

    2003 ComputerTrainingManual.com

    61

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    Tools Description

    Option GroupUsed along with check boxes, option buttons, or toggle buttons todisplay a set of alternative values. For example, you can use anoption group to specify whether an order is shipped by air, sea, orland. In a data access page, an option group can contain onlyoption buttons.

    Toggle ButtonUsed as a stand-alone control bound to a Yes/No field in aMicrosoft Access database or a Bit column in a Microsoft Accessproject. The toggle button is an unbound control for accepting userinput in a custom dialog box or in part of an option group.

    Option ButtonUsed as a stand-alone control bound to a Yes/No field in aMicrosoft Access database or a Bit column in a Microsoft Accessproject. The option button is an unbound control for accepting user

    input in a custom dialog box or in part of an option group.

    Check Box Used as a stand-alone control bound to a Yes/No field in aMicrosoft Access database or a Bit column in a Microsoft Accessproject. The check box is an unbound control for accepting userinput in a custom dialog box or in part of an option group.

    Combo BoxCombines the features of a list box and a text box. You can type inthe text box or select an entry in the list box to add a value to anunderlying field.

    List Box Displays a scrollable list of values. When a form is open in Formview or when a data access page is open in Page view or MicrosoftInternet Explorer, you can select from the list to enter a value into anew record or to change the value in an existing record.

    Command Button Used to perform actions, such as finding a record, printing a record,or applying a form filter.

    ImageUsed for displaying a static picture on a form or report. Because astatic picture is not an OLE object, you can't edit the image insideMicrosoft Access after you've added it to a form or report.

    Unbound ObjectFrame

    Used to display an unbound OLE object, such as a Microsoft Excelspreadsheet, on a form or report. The object remains constant asyou move from record to record.

    Bound ObjectFrame

    Used to display OLE objects, such as a series of pictures, on a formor report. This control is for objects stored in a field in the form's orreport's underlying record source. A different object appears on theform or report as you move from record to record.

    Page BreakUsed to begin a new screen on a form, a new page on a printedform, or a new page of a report.

  • 7/29/2019 access2003m4_a5t

    62/97

    2003 ComputerTrainingManual.com

    62

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    Tools Description

    Tab ControlUsed to create a tabbed form with several pages (such as theemployee form in Northwind) or tabbed dialog box (such as theOptions dialog box on the Tools menu). You can copy or add othercontrols onto a tab control. Right-click on the Tab control in thedesign grid to modify the number of pages, the page order, theselected page's properties, and the selected tab control properties.

    Subform/Subreport Used to display data from more than one table on a form or report.

    LineUsed on a form, report, or data access page to emphasize relatedor especially important information or to divide a form or page intodifferent sections, for example.

    Rectangle Used for graphic effects, such as grouping a set of related controls,or used for emphasizing important data on a form, report, or dataaccess page.

    More ControlsDisplays other toolboxes and OLE objects.

  • 7/29/2019 access2003m4_a5t

    63/97

    2003 ComputerTrainingManual.com

    63

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    Open the previous Training2.mdb database or create a new database. If you create a

    new database, import all tables from the Northwind database. (Depending on yoursetup, the Northwind database should be found in C:\Programs Files\MicrosoftOffice\Office11\Samples folder).

    How To Create AReport UsingThe Wizard

    1. Click .2. Click Report Wizard

    and select the recordsource.

    3. Click the OK buttonand select the fieldsto be included in thereport.

    4. Click the Next buttonand select thegrouping levels.

    5. Click the Next buttonand specify the sortorder.

    6. Click the SummaryOptions button and

    specify the summaryoptions.

    7. Click the OK buttonand specify the reportlayout.

    8. Click the Next buttonand specify the style.

    9. Click the Next buttonand type the reportname.

    10. Click the Finishbutton.

    1. From the Object Bar, click Reports. Click theNew button. Click the Report Wizard. Then selectOrder Details as the record source.The New Report dialog box appears as shown below.

    2. Click the OK button. Click the button.All the fields are selected; they will all be shown in the report.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    64/97

    2003 ComputerTrainingManual.com

    64

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    3. Click the Next button.You can specify how to group the records here. By default, the report is groupedby the OrderID and the details of the report are as shown below. If you want to

    create another grouping level, select the field name, then click the button.

    4. Click the Next button. Specify sorting records byProductID as below.If you want to sort the product IDs in ascending order, click the Ascendingbutton.

  • 7/29/2019 access2003m4_a5t

    65/97

    2003 ComputerTrainingManual.com

    65

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    5. Click the Summary Options button. In the Quantitybox, click the Sum check box.This is where you specify the summary of the report that appears at the footer ofthe sections. There are four functions listed here. However, you can createyour own function in the report design view.

    6. Click the OK button. Then click the Next button.You can specify different layouts for your report here.

  • 7/29/2019 access2003m4_a5t

    66/97

    2003 ComputerTrainingManual.com

    66

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    You normally have tomake some minoradjustments to theappearance of thereport after it iscreated. E.g. TheOrderID may appear

    aligned with the OrderID heading as the IDis aligned to the rightof the text box.

    7. Click the Next button.This is where you select the style you want to use for your report.

    8. Click the Next button. Then click the Finish button.Type in the report name if you wish to use a different name from the one shownin the dialog box, or else the table name `Order Details is used as the defaultname for the report. The report is displayed as shown below.

    T IP S

  • 7/29/2019 access2003m4_a5t

    67/97

    2003 ComputerTrainingManual.com

    67

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How ToReorganizeLabels AndControls InSections

    1. Open the report inDesign View.

    2. Adjust the labels andcontrols in the reportsections.

    3. Click the PrintPreview button.

    1. Click the Design view button to switch the OrderDetails report to Design View.The report design appears, as shown below.

    2. Adjust the labels in the Page Header section, theOrderID control in the OrderID Header section,controls in the Details section and the OrderID Footersections.Resizing and moving the labels and control techniques in report view is similarthe process in form design view. Refer to the Creating Advanced Forms sectionif you have difficulties resizing and moving the controls.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    68/97

    2003 ComputerTrainingManual.com

    68

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    3. Click the Print preview button to preview the OrderDetails report.The new appearance of the report is shown below.

  • 7/29/2019 access2003m4_a5t

    69/97

    2003 ComputerTrainingManual.com

    69

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To Insert A

    CalculatedControl

    1. Open the report inDesign View.

    2. Click the Text Boxtool.

    3. Click the positionwhere you want toplace the control.

    4. Type the formula.

    1. Open the Order Details report in Design View.Make sure there is sufficient space on the right of the Discount control.

    2. Click the Text Box tool in the toolbox.If you do not see the toolbox, click the toolbox button on the toolbar.

    3. Click to the right of the Discount control.A text box control is created to the right of the Discount control.

    4. Type =[UnitPrice]*[Quantity]*(1-[Discount]). The formula is entered into the control.

    5. Delete the existing label and use the Label tool tocreate a new label Total on the Page Header section.The default label for the control is no longer needed in the Details section.

    The new calculated control in the report appears as shown below if you switch toPrint Preview.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    70/97

    2003 ComputerTrainingManual.com

    70

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To ChangeThe Format Of AControl

    1. Open the report inDesign View.

    2. Double-click thecontrol.

    3. Click the Format tab.

    4. In the Format box,select the formattype.

    1. Open the Order Details form in Design View. Double-click the Total control.The Text Box properties dialog box appears. The title of your text box dialog boxmay vary from the one shown here. Make sure the Format or All tab is selected.

    2. In the Format box, select Currency.You will change the format of the Total control to currency.

    3. Switch the report to Print Preview.The Total value appears as shown below

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    71/97

    2003 ComputerTrainingManual.com

    71

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    Custom iz ing Repor t Sect ion s

    You can use sections to produce calculations, group data, summarize and producean analysis of the data in your database. You can group data to better organize thedata in your report. This helps you to organize related data for analysis. For example,you may want to group total sales by each sales person so that you can compare theirperformance.

    Here is an example of a report without grouping sections.

  • 7/29/2019 access2003m4_a5t

    72/97

    2003 ComputerTrainingManual.com

    72

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    An example of a report with grouping sections.

    Grouped By Ship Country

    Grouped By Order Date

  • 7/29/2019 access2003m4_a5t

    73/97

    2003 ComputerTrainingManual.com

    73

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To Create A

    Report FromScratch

    1. Click the Reportsbutton from theDatabase Window.

    2. Click the Newbutton.

    3. In the New Report

    dialog box, selectDesign View andselect the recordsource.

    4. Click the OK button.5. Save the report.

    1. From the Database Window, click Reports. Click the

    New button.The New Report dialog box appears.

    2. Click Design View and select the Orders table as theobjects data source.The report will get data from the Orders table.

    3. Click the OK button.The report is created and appears in Design View. By default, there are onlythree sections in the report: Page Header, Detail and Page Footer. There areno controls in the report. You have to add the controls manually from the fieldlist and the toolbox.

    4. Save the report as Orders.The default name of the report is Report1

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    74/97

    2003 ComputerTrainingManual.com

    74

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To InsertHeader AndFooter Sections

    1. Open the report inDesign View.

    2. Click View >> ReportHeader/Footer.

    You can use the sametechnique to removethe report header andfooter sections.

    1. Open the Orders report in Design View. From themenu, click View >> Report Header/Footer.The Report Header and Report Footer sections are created, as shown below.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    75/97

    2003 ComputerTrainingManual.com

    75

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To Insert

    Group HeaderAnd FooterSections

    1. Open the report inDesign View.

    2. Click the Sorting andGrouping button onthe toolbar.

    3. In the Field /Expression column,select the field to begrouped.

    4. Under GroupProperties, in theGroup Header and/orGroup Footer box,click the Yes option.

    You can use the sametechnique to removethe group header and

    footer sections.

    1. Open the Orders report in Design View. Click theSorting and Grouping button on the toolbar.The Sorting and Grouping dialog box appears.

    2. In the Field/Expression column, select ShipCountry asthe first level of grouping. Under Group Properties, inthe Group Header box, click Yes.The ShipCountry header section is created in the report.

    3. In the Field/Expression column, select OrderDate asthe second level of grouping. Under GroupProperties, in the Group Header and Group Footerboxes, click Yes.The OrderDate header and footer sections are created in the report.

    The group header and footer sections appear in the report as shown below.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    76/97

    2003 ComputerTrainingManual.com

    76

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To InsertControls AndLabels IntoSections

    1. Open the report inDesign View.

    2. Add labels to the

    report using theLabel tool.

    Click the followingbuttons on the toolbar ifthe Field List or theToolbox is hidden.

    Shows Field List.

    Shows Toolbox.

    1. Open the Orders report in Design View. Drag anddrop the ShipCountry, OrderDate, OrderID andCustomerID fields from the Field List to the reportdesign. Resize the controls as shown below.The labels always accompany the controls when you drag the fields onto thereport. Delete all the labels.

    2. Select all controls and click the Align Left button.Set all the records to align to the left. You can hold the key to selectmultiple controls.

    3. Add labels to the report using the Label tool asbelow.Format for Report Header: Font Size 12pt, Bold, Red.Format for Page Header: Font Size 10pt, Bold, Blue.The report design is displayed below.

    4. Switch the report to Print Preview.The report is shown below.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    77/97

    2003 ComputerTrainingManual.com

    77

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How ToCustomize TheFormat Of AControl

    1. Open the report inDesign View.

    2. Double-click thecontrol.

    3. In the Format box,specify the format.

    Date format coded - daym - monthy - year

    1. Open the Orders report in Design View. Double-clickthe OrderDate control.The Text Box Properties dialog box appears.

    2. In the Format box, type yyyy.This is to format the date to show only the year.

    3. In the Page Header section, edit the Date label to Year.Click the label once, and then click it again to edit the text.

    4. Switch the report to Print Preview.The report is shown below. Notice that even the OrderDate control is in theOrderDate Header section (records should be grouped by the OrderDate), therecords remain ungrouped because the section treats the OrderDate as anindividual date instead of a year.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    78/97

    2003 ComputerTrainingManual.com

    78

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To ChangeThe PropertiesOf A Group

    1. Open the report inDesign View.

    2. Click the Sortingand Groupingbutton.

    3. Click the groupinglevel row.

    4. Under GroupProperties, changethe settings.

    1. Open the Orders report in Design View. Click theSorting and Grouping button.The Sorting and Grouping properties dialog box appears.

    2. Click the OrderDate grouping row. Under GroupProperties, in the Group On box, click Year.This is to set the section to group the records by year instead of by day.

    3. Switch the report to Print Preview.The records are grouped by year, as shown below.

    Group Properties Description

    Group Header To display the group header section.

    Group Footer To display the group footer section.

    Group On To group by value or range of values.

    Group Interval Interval or no. of characters to group on.

    Keep Together To keep parts of a group (the groupheader, detail and footer section) togetheron the same page.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    79/97

    2003 ComputerTrainingManual.com

    79

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To ChangeThe PropertiesOf A Section

    1. Open the report inDesign View.

    2. Double-click thesection divider line.

    3. In the Section

    Properties dialog box,change theproperties.

    1. Open the Orders report in Design View. Double-clickthe Page Header section divider line.The Section Properties dialog box appears.

    2. Click the Back Color box, click the button andselect the Grey color.The color code appears in the back color box.

    3. Switch the report to Print Preview.The page header color is now changed.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    80/97

    2003 ComputerTrainingManual.com

    80

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To InsertAnalyticalValues IntoSections

    1. Open the report inDesign View.

    2. In the group footersection, create a text

    box.3. Type the formula for

    the text box.4. Edit the label for the

    text box.

    If you place the controlat the report footersection, it will calculatethe number of ordersfor the entire report andplace it at the end of the

    report.

    1. Open the Orders report in Design View. In theOrderDate Footer section, create a text box. Type=Count([OrderID]) in the text box. Edit the label toTotal number of orders: .This is to calculate the total occurrences of the records for the group.

    2. Switch the report to Print Preview.The total number of orders appears at the end of each OrderDate group.

    Other basic functions that you can use.

    Functions Description

    =Sum([field]) Calculate the total for the field.=Max([field]) Find the maximum value for the field.=Min([field]) Find the minimum value for the field.

    =Average([field]) Calculate the average value for the field.=Count([field]) Find the number of occurrences of the

    records.

    Note: The first four functions are only for fields that containvalues only.

    SUMMARY

    T IP S

  • 7/29/2019 access2003m4_a5t

    81/97

    2003 ComputerTrainingManual.com

    81

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To InsertPage Numbers

    1. Open the report inDesign View.

    2. In the Page Footersection, create a textbox.

    3. Type the pagenumber formula.

    4. Delete the label.

    1. Open the Orders report in Design View. In the PageFooter section, create a text box. Type =Page&[Page] in the text box. Delete the label.Quotation marks are used to add a text string to the value in the control.&[Page] is the syntax to display the current page.

    2. Switch the report to Print Preview.The page numbers are displayed at the end of each page.

    SUMMARY

  • 7/29/2019 access2003m4_a5t

    82/97

    2003 ComputerTrainingManual.com

    82

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    Creat ing A Char t Repor t

    You can produce a chart report easily with the chart wizard.

    Charts are visually appealing and make it easy for users to see comparisons, patterns,and trends in data. In Microsoft Access, you can create charts in a form, report, or dataaccess page.

    In a form or report, you can use Microsoft Graph to create a chart linked to data fromthe available tables, queries, or other record sources. The charts can be global(including all data) or record-bound (reflecting data only from the current record, in whichcase the chart is updated as you move from record to record).

    Several chart types, including two-dimensional (2-D) and three-dimensional (3-D)types, are available for you to choose from. Formatting options include adding text andgraphics to the charts, changing colors, and adding trendlines and error bars.

  • 7/29/2019 access2003m4_a5t

    83/97

    2003 ComputerTrainingManual.com

    83

    Microsoft

    Acc ess 2003 Module 4

    CREATING ADVANCED REPORTS

    How To Create AChart ReportUsing TheWizard

    1. Click the Newbutton.

    2. In the New Report

    dialog box, selectChart Wizard and thesource.

    3. Click the OK button.4. Select the fields and

    then click the Nextbutton.

    5. Select the charttypeand then click theNext button.

    6. Drag thefield buttonto the Data andSeries box.

    7. Click the Next buttonto change the cha