`
`
`
`
`
`Merrill Communications LLC
`d/b/a Merrill Corporation
`Exhibit 1005 pt. 9
`
`
`
`[renting Fornl$
`uith Form l^liznrds
`
`form offers an alternative way to
`view and work with data in your
`tables. Unlike the datasheet view,
`which always displays data in rows and columns, a form can display data in just about
`any format. Perhaps the most common use of a form is to create a fill-in-the-blanks
`view of your data that resembles a paper form your company already uses.
`With Form Wizards you can create great-looking data entry forms in about two sec-
`onds flat. You just pick the style you want, click your mouse a few times, and voilà, a
`form appears. You can use any Wizard-created form, except a chart or PivotTable
`(described later in this chapter), to enter data into tables. This chapter explains how to
`use Form Wizards to create several types of predesigned forms. These designs (with a
`few tweaks here and there) probably can handle most of your data entry needs.
`
`You can save lots of time by using Form Wizards to set up forms, even if you plan
`to customize those forms extensively. Chapter 3 explains how to work with Wiz-
`ards and gives you hands-on practice with them.
`
`
`
`42O',
`
`CHAPTER 11 . CREATINC FORMS WITH FORM WIZARDS
`
`Just in case you're wondering whether Access has more form design tools to offer,
`the answer is a resounding Yes! If you need a more elaborate form than the Form Wiz-
`ards can create, Chapter 13 explains how to design and customize forms and reports.
`If you need extra help with designing a new form, double-click on theWorkingWith
`Formsbookin the Access Help Contents and then double-click on books and topics that
`interest you.
`
`lrltlat ltinds 0f Forms [an the Form l^lizards [reo[e?
`The Form Wizards can create several types of forms showing fields from one or more
`tables and/or queries. To help you decide which type of Wizard-designed form is best
`for your own data, we show some representative examples. Then we explain how to
`create forms with Wizards, save those forms, and use them effectively.
`
`Columnar Forms
`In a columnar form each field appears on a separate line with a label to its left; only one
`record is shown on each screen. The Wizard filts the first column with as many fields as
`will fit on a single screen, then it fills the next column with as many fields as will fit,
`and so forth. Figure 11.1 shows a sample columnar form for the Customers table.
`
`TP
`You can customize the styles available in Form wizards. To get started, open any
`form in design view and choose Format Þ AutoFormat, or click on the AutoFormat
`button on the Form Design toolbar. Click on the format you want to customize in the
`AutoFormat dialog box and then click on the Customize button. See Chapter 1 3 for
`more details.
`
`Tabular Forms
`Figure 11.2 shows a tabular form for the Products table. As you can see, tabular forms
`display fields in a horizontal row with fietd labels at the top of the form. Each new row
`represents a new record
`Tabular forms are best when you want to disptay iust a few relatively narrow fields
`and you want to see several records at once. To avoid spending most of your time scroll-
`ing back and forth in a tabular form, add just a few fields to the form.
`
`
`
`of
`
`il
`-o
`C'
`Gô
`
`t\t
`cD
`
`E(!
`q,
`
`TJ
`
`F|GURE I I I
`A columnar form
`for the Custom'
`ers table, in the
`Standord stYle'
`
`F'GURE I1.2
`A tabular form
`for the Products
`tuble in the
`Clouds stYle. The
`tqbular laYout is
`best when You
`have iust o few
`narrow fields to
`displaY and You
`want to see sev-
`eral records on a
`s¡ngle screen.
`
`WHAT KINDS OF
`
`FORMS CAN THE FORM WIZARDS CREATE?
`
`421
`
`-lï
`
`Fax N¡¡rrb¿l
`
`tEEl¡@c-
`
`ol 7
`
`I
`
`E Cuslomers
`Custsnel l0
`
`t.
`
`EonpanY Name
`
`Conlæt Fbst N¿
`
`Contàct Lãg Nö
`
`BiHing Addtass
`
`City
`
`5 t¿te/Ptovince
`
`187 Polk
`lsuit" s
`
`Post¡l Code
`
`117-
`
`CurntrY
`
`Contact Title
`
`Phone Number
`
`Flecord:
`
`E P¡oducts
`Prorluct lD
`
`r
`
`Product Name
`
`Unit Price
`
`¡¡ Bâsketball
`2 Fælball
`
`ball
`
`4 Volleyball
`
`5 Goll balls
`6 CrYStal b€ll
`
`7 Baseball
`
`I Billiard balls
`I felher ball
`
`10 Foosball
`
`$4.S5
`
`$5.65
`
`$12.95
`
`$3.25
`
`$6.75
`
`$45.55
`
`$8.75
`
`$127.45
`
`$9.65
`
`$17.85
`
`(AutoNurnber)
`
`Feeotd:
`
`of 10
`
`/
`
`Datasheet Forms
`Adatasheetforminitiallydisplaysdataindatasheetviewtnuchasitappealswhenyou
`open a table oruu" u Otå, ot *ittt you use the Form View toolbar button to switch to
`datasheetViewinanyrorm.ThiStypeofformisoftenusedaSthebasisforsubforms,
`describedinamoment.Figurell.3showsadatasheetformfortheEmployeestable.
`
`
`
`422
`
`CHAPTER 11 . CREATTNC FORMS W|TH FORM WIZARDS
`
`F'GURE I1,3
`A dotasheet
`form for the
`Employees
`table in
`datosheet view.
`
`Gl Employees
`
`Anita
`Andrew
`
`Doris
`I AftP
`Jo
`
`en
`
`Etl
`
`Litì
`Van Noslo
`Niktog
`
`Swi
`Wheels
`Honcho
`
`Fresident
`
`Oflice
`
`(AutoNunr
`Recordr l{lr lf----T
`4t
`
`¡lrllr*lors
`
`rt.
`
`I
`
`You can switch from datasheet form to form view by choosing view Þ Form View,
`or by clicking on the drop-down arrow next to the Form view toolbar button and then
`choosing Form View. In form view the fields appear in a tabura¡ rayout, but only one
`record is visible on each page of the form. Figure 1 1.4 shows the Employees form after we
`switched from datasheet view to form view; this example uses the International style.
`
`ha
`
`E
`The Form Wizards take their best guess when trying to fit labels and fields on your
`form. After creating the form, you may need to switch to design view and refine the
`design. ln Figure l1 .4, for example, the Em ployee lD label is cut off because the
`font is too large. To fix this problem, switch to design view and widen the label
`control or choose a smaller font for the Iabels
`
`FIGURE I1.4
`The dotasheet
`form, shown in
`form view. To
`resize the win-
`dow to fit
`snugly, we chose
`WindowÞ Size
`To Fit Form.
`
`ployssF tin*tlhns læt]lane liüe
`
`lxtEsim
`
`Wmkhno
`
`Flecord rrlrl
`
`r l¡¡,1¡+l ot I
`
`Hierarchical Forms
`Sometimes you'rl want to work with related tabres in your forms. For example, you
`might want to design an order form that includes customer and order information,
`
`
`
`o t
`
`gl¡
`tg
`Gô
`'ìc
`filo!U
`
`Gl
`
`WHAT KINDS OF FORMS CAN THE FORM WIZARDS CREATE?
`
`423
`
`along with detaits about the products ordered. A hierarchical form showing data frqm
`tables that have a one-to-many relationship is perfect for iobs like this.
`The Form Wizards can create hierarchical forms in two basic flavors: a main form
`and subforms or a main form and linked forms. (A subform is a separate form that's
`embedded in a main form.)
`Figure 11.5 shows a main form with subforms and displays information from four
`tables: Customers, Orders, Order Details, and Products. The main form shows fields
`from the Customers table, arranged in columnar layout. The subforms for the Orders
`table and the order Details and Products tables appeaf in datasheet layout.
`
`¡{
`E
`The main form and subform often go by the names main/subform, form/subform,
`ot moster/detailform.
`
`t,ttvit',E',
`This hierqrchi-
`cal moin form
`shows fields
`from the Cus-
`tomers tqble,
`ond its two
`datosheet sub-
`forms show
`fields from the
`Orders, Order
`Detoils, ond
`Products tobles.
`This exomple
`uses the
`Colorful2 style.
`
`EÞ Eü View Inst Fprmàl Beøds Iæh þiindow [elp
`
`EJ Customers
`
`Cuât(
`
`Coritt
`
`Main form
`
`comt lAtst, Lorl
`
`City
`
`Stste.
`
`;-i
`r:
`;san !-Jdrl
`
`imi
`
`Poâta
`
`Coun
`
`Cor¡tr
`
`¡"* ¡, l1+_t !¡
`
`,U5À i
`
`¡
`
`Phon'rl4l lrj 55i
`
`Subform
`
`Subform
`
`Ordere
`
`ffæød
`
`\r&
`
`52
`
`AËC
`
`h
`
`c
`
`Corporation
`
`Dorìs
`Anìtã
`5
`
`Easketball
`Footbell
`
`ol 5
`
`d7
`
`$4 95
`$5.65
`EE
`
`{
`
`f l- iñúril--f"
`
`Main form's
`navigation buttons
`
`Subform's
`navigation buttons
`
`Subform's
`navigation buttons
`
`
`
`CHAPTER 1i . CREATINC FoRMs WITH FORM WIZARDS
`
`Linked forms, such as those shown in Figures lt.6 and 11.7, arso present multitable
`data hierarchically. But instead of showing all the fields from the main table crowded
`on the same page used for subforms, the main table,s fields appear on a separate form.
`You can then click on the command button near the top of the form to show records
`that are synchronized with the record on the first form. The linked form can be a main
`form or a main form with a subform (see Figure 11.2).
`To produce the forms shown in Figures 1 1 .5, 1 1 .6, and. rr.7 , we ïan the Form wizard,
`and selected all fietds from the Customers, Orders, and Order Details tables and iust the
`Unit Price field from the Products table. While viewing the Order Details subform, we
`dragged the Unit Price field for the Products table next to the unit price field for the
`Order Details table; this arrangement lets us see the unit price from the products table
`while we enter the actual selling price into the unit price field of the Order Details table.
`We also dragged the OrderID field in the Ordei Details subform to the left of the Order-
`DetaillD field.
`
`lf you've already created forms that include the necessary linking fields, you can quickly
`combine them into a main form with a subfo rm. To do so, open the main form in
`design view, press F11 to bring the database window to the fronÇ click on the Forms
`tab on the database window, and choose Wi ndow Þ Tile Vertically. Then drag the
`subform from the database window to an appropriate spot on the main form,s design
`window and respond to any prompts that appear. See Chapter I3 for more details.
`
`El Customers
`
`0rders
`
`F'GURE I1.6
`A linked form
`showing Cus-
`tomers dota on
`the moin form.
`Clícking on the
`Orders com-
`mqnd button
`disploys the
`form shown in
`Figure 11.7. Thís
`example uses
`the Flox style.
`
`Record:
`
`of7
`Main form
`
`Command button opens linked form
`
`¿
`
`
`
`WHAT KINDS OF FORMS CAN THE FORM WIZARDS CREATE?
`
`425
`
`Subform
`
`Main form (linked to Customers form)
`
`\ Miæsoñ Access
`lnst Fg¡m* $mds lds Window !sþ
`g$B Edit
`
`EI
`
`ãl 0¡ders - Fiqure.ll 06
`
`oo3f
`
`it
`
`.ltô
`C'
`ctì
`
`tso
`l)
`
`Football
`
`bal
`
`$4,95
`
`.55
`
`$4 95
`$5 65
`55
`
`5 lFåtetedl
`
`¿
`
`t¡del
`
`lFilFi-"ffiNú¡rf - f-
`Main form's navigation buttons Subform's navigation buttons
`
`Making Hierarchical Forms Work Properly
`To work properly the main form and subform must be linked by a common field in a
`one-to-many relationship (or, less often, a one-to-one relationship)'
`. The table or query on the one side-for example, Customers-supplies data for
`the main form.
`. The table or query on the many side-for example, Orders-supplies data for the
`subform.
`. The forms are linked by a primary key field on the one side and a normal field (called
`ttre foreigtrkey) on the many side. In the customers and orders example, customerlD
`is the primary key field on the one side and a foreign key on the many side.
`
`F'GURE I1.7
`The linked form
`ond subform
`appear when we
`clíck on the
`Orders button
`shown in
`Figure 11.6.
`This form shows
`Orders, Order
`Details, qnd
`Products infor'
`mqtion for the
`customer whose
`name appears in
`Figure 11.6. To
`return to the
`moín form,
`close the
`linked form.
`
`
`
`I CHAPTER 11 o CREATTN C FORMS WITH FORM WIZARDS
`
`'.42r,t
`
`The most common problem with creating hierarchical forms occurs when the Form
`wizard can't figure out how to link your main form and subform. This problem can
`occur, for example, if you haven't explicitly set up a relationship between the tables,
`either via- the Relationships window or a murtitable query. As you,ll see shortry, the
`Form wizard will ret you know when this problem exists, and it witt give you a chance
`to set up relationships.
`
`E
`Chapter 6 explains how to use the Relationshi ps window to define relationships
`between tables in your database. Ch apter 1 0 explains how to use queries to
`define relationships, select specific data, and perform calculations on data. Cha p-
`ter 1 3 explains how to set p roperties that link main forms and subforms
`
`one way to get the most out of using the Form wizards is to create hierarchical
`forms. For best results, include all fietds from tables on the many side. you can ut*uy,
`remove unwanted fields or rearrange them later.
`In some cases involving multiple related tables that have lookup fields, Access may
`not connect the related tables and fields properly, and it might not tell you that it is
`unable to do so. For example, when we incruded alr the order Entry database fields
`from our sample Customers, Orders, Order Details, and products tables on a form, the
`drop-down list for the productlD field in the order Details subform was empty and
`the lookup values displayed incorrectly.
`To work around this gritch, we opened the probrem subform (order Details sub_
`form) in form design view, opened the property sheet (view Þ properties), and clicked
`on the orderDetails.productlD control. Then we changed its Row source property to
`Products, its column count prope fiy to 2, and its column widths property to o,,;!,, and
`saved the subform. see chapter 6 for information about lookup fielãs and chapter 13 for
`details about working with properties.
`You should also avoid renaming subforms or rinked forms. Doing so can prevent
`Access from finding and opening those forms. If you do rename the forms, you,il need
`to open each main form and subform in design view, choose view Þ properties (if the
`property sheet isn't visible), and click on the All tab on the property sheet. Then fix every
`reference to the old form name in the Name and source ob¡ect properties and in all Event
`Procedures. (You can edit any event procedure, and then use the Edit Þ Replace com_
`mand to globally change references in the current module.) Be sure to fix these properties
`for the entire form and for any command buttons and subforms on the form.
`For more details about creating hierarchical forms, look up subforms, creating in t,,e
`Access Help Index. chapter 13 explains how to alter properties and select controls. See
`Parts Four and Five for more about events and the visual Basic program code that,s used
`in Event Procedures.
`
`
`
`o G
`
`'l¡
`a!
`lsô('
`
`E'ì
`
`G t
`
`!o
`l,
`
`WHAT KINDS OF FORMS CAN THE FORM WIZARDS CREATE?
`
`427
`
`Charts
`Charts convert the numbers in your data to useful graphs that help to clarify the meaning
`of those numbers. The chart in Figure 11.8 shows the contribution of each customer's
`orders to the company's total sales. We used a Select query as the data source for the sam-
`ple chart (refer to Figure 10.17 in Chapter 10). Chapter 14 explains how to create charts.
`
`'¡lll¿l¿J¿',¡tl
`A pie chort
`showing the
`contribution of
`each customer's
`orders to total
`sqles. We
`tweoked the
`appearance of
`this chort ofter
`the Chqrt Wiz-
`ord creoted it.
`
`E Pie in the Sky
`
`ãE]EI
`
`Custu¡ner Contrìã¿úìøts tn TotaÍ SfiIÊs
`
`¡23
`
`tr 14",i
`
`s 't.l1Ì'
`
`tr 3't!¡t
`
`a zlotr
`tr ABC Corporût¡on I Reese C¡¡n¡c
`B lrniuersity of lhe Elite lWorldwde Widgets
`
`Hecsd: xlr I
`
`ofl
`
`PivotTables
`A PivotTable lets you summarize large amounts of data, much as a Crosstab query does
`(see Chapter i0). But a PivotTable is more flexible than a Crosstab query because it lets
`you interactively switch the row labels, column labels, and summary calculations as
`needed. In Figure 11.9 you see a PivotTable that's based on the query shown below.
`Chapter 14 explains how to create and use PivotTables.
`
`T{
`
`E
`You must have Microsoft Excel installed to create and use PivotTables.
`
`
`
`428
`
`CHAPT ER 11 . CREATINC FORMS W|TH FORM WTZARDS
`
`!il,e ldt View lmert Fgmat !æords lools \{hrdow Heþ
`\¡ltimfl
`l¿/orksheet in Pivot Form
`Ercel
`file ldit View ln*ert Fprmèt Tæb D€*å Wirdoll Eeþ
`r-E r
`
`El
`
`B
`
`c
`
`D
`
`F
`
`I2
`
`4 5 6 7II
`
`FIGURE I T.9
`This PivotToble
`shows the num-
`ber of eoch
`product sold,
`by stote. After
`opening o form
`showíng a Pivot-
`Table in Access,
`we clicked on
`the Edit Pívot
`Table button
`(not shown) to
`launch Microsoft
`Excel and
`customize the
`PivotToble
`os needed-
`
`,j
`
`I
`
`I
`
`irand Total
`
`'10
`
`13
`
`0
`
`1 1
`
`1
`
`Ef
`
`7
`
`fñûrf-r
`
`NNl
`
`2 2
`
`¡nd Fivrrt
`{t
`
`t4
`
`At(
`
`liA
`
`ID
`
`0 ?
`
`0 5
`
`1
`
`t00
`
`12
`
`Easeball
`Basketball
`Eilliard balls
`Crystal ball
`Fo¡sball
`Football
`Golf balls
`lo
`Soccer ball
`ï1
`Tether ball
`12 Grand Total
`4tlrrl¡
`Creates a new pivot lable or modil¡es the curenl one
`
`llsing l^liznrds lo [rente ¡ Form
`Now that you've seen the many types of forms the Form wizards can create, why not
`try the Wizards? The steps are easy:
`
`1. Start fi'om any of these places:
`' To base your form on a specific table, start from the database window, click
`on the Tables tab, and highlight the table name. or open the table in datasheet
`view. If the table has a filter and sort order associated with it, the new form will
`inherit the filter and sort order automatically (see Chapter 9).
`
`¡\a (Þ
`E
`You also can startyourform from tabre design view. lf you do, however, theform
`can be displayed in design view only; you'll get an error message that your table
`is exclusively locked (click on oK to clear the message). To view the form in form
`view, pull down the window menu and switch to the table design window. Then
`close the table design window (ctrl+w), switch back to the form design window,
`and click on the Form View toolbar button.
`
`
`
`USINC WIZARDS TO CREATE A FORM
`
`429
`
`o To base your form on a specific query (or saved filter), start from the data-
`base window, click on the eueries tab, and highlight the query name. or open
`the query in datasheet or design view.
`' If you're not sure which table or query you want to base the form on, start
`anywhere in Access (of course, a database must be open) or click on the Forms
`tab in the database window.
`2. click on the drop-down arrow next to the New object toolbar button. you,ll see
`this menu:
`
`ot
`
`g
`l¡
`t!
`ßô
`l
`
`ÑÞ
`
`.g
`t!
`
`EU
`
`6 ¡utorq-
`ff n*ongort
`
`Éül lðÞÞ
`'ÈF Q¡ery
`ËËl Eùm
`ll Rupott
`fl t"lqcro
`it go¿,¡e
`{Þ qFs' M4ute
`
`3. Choose one of these options:
`AutoForm creates a one-column form using the template named in the Form
`Template box on the Forms/Reports tab of the options diarog box (Tools Þ
`options Þ Forms/Reports; see chapter 15). Typicaly, this temprate is named
`Normal, and it resembles the Standard style shown in Figure 11.1. After choos_
`ing this option, skip to step 11-you're done! using the AutoForm option
`makes sense only if you selected a table or query in step 1.
`New Form Opens the New Form dialog box, shown here:
`
`New Form
`
`E
`
`C¡eate a new furm without
`using a wizard.
`
`Farm
`AutoF¡rrm: Ilalu¡¡n¡r
`AutoForm: Tabul¡r
`AutoForm: D¡t¡sheet
`f,h¿rl \y'iz¡rd
`PivotT¡ble Wizard
`
`Choose the table or query where
`the object's data comes hom:
`
`ÛK
`
`Cancel
`
`
`
`ffi
`
`CHAPTER 11 r CREATTNC FORMS W|TH FORM WTZARDS
`
`To open the New Form dialog box in fewer steps, click on the Forms tab in step 1
`and then click on the New button in the database window. or start from any taà on
`the database window and choose lnsert Þ Form. To create an AutoForm quickl¡
`highlight a table or query name on the Tables or Queries tab in the database winJow
`and then choose lnsert Þ AutoForm.
`
`4. choose the table or query from the drop-down list (near the bottom of the New Form
`dialog box) on which you want to base the form. (This box may be filled in atready.)
`
`l\t
`
`You must select a table or query before choosing any of the AutoForm wizards or
`the Chart Wizard in step 5. lf you plan to use the Form Wizard or pivotTable Wizard
`in step 5, you'll have another chance to choose tables and queries.
`
`5. click on one of the following options (they appear in the list near the top of the New
`Form dialog box) and then click on oK; or just double-click on the appropriate option.
`When you click on an option, the area in the left side of the dialog box will show an
`example and describe the form the selected option will create. your options are
`Design View Opens an empty form design window
`Form wizard opens the Form wizatd. From here you can select which tables,
`queries, and fields to include on the form, create subforms or linked forms (if
`appropriate), choose a style for the form, and specify a title and name for your
`form(s). Figures 11.1 through 11.7 show examples of forms that we created with
`the Form Wiza¡d.
`AutoForm: columnar creates a columnar form from alr the fierds in the
`selected tabre or query (see Figure 11.1) without asking any more questions.
`AutoForm: Täbular creates a tabular form (see Figure 11.2) without asking
`any more questions.
`AutoForm: Datasheet creates a datasheet form (see Figures 11.3 and 11.4)
`without asking any more questions.
`I
`
`(E)TE
`when you choose AutoForm: Columnar, AutoForm: Tabular, orAutoForm: Datasheet
`Access places fields in the order they,re definêd in the table design or query, puts the
`name of the table or query on the formt title bar, and uses the default style. The
`default style is the style you (or someone else) chose most recently. lf necessary, the
`Wizard will create a main form and subforms, even if you don't ask it to. After choos-
`ing an ¡\utoForm option, skip to step 11 and then save your form
`
`
`
`USINC WIZARDS TO CREATE A FORM
`
`431
`
`a)
`
`Glt
`fit
`tgô
`ttc
`(go
`U
`
`Gc
`
`Chart Wizard Creates a form that displays a free-standing chart of your table
`or query data (see Figure 11.8 and Chapter 14).
`PivotTable Wizard Creates a form that can display a Microsoft Excel Pivot-
`Table (see Figure 11.9 and Chapter 14).
`
`6. Assuming you chose Form Wizard in step 5, you'll see the first Form Wizard dialog
`box, shown in Figure 11.10. Use any of the techniques described below to add as
`many fields from as many tables or queries as you need and then click on Next.
`. To select a table or query, click on the drop-down arrow button below Tables/
`Queries and then choose the table or query to use.
`. To add one field to the form, click in the Selected Fields list where the new
`field should appear (optional). Then double-click on the field in the Available
`Fields list, or click on the field in the Available Fields list and then click on the
`> button. The field you select will move to the Selected Fields list and will
`appear on the form in the order shown.
`o To copy all the Available Fields to the Selected Fields list, click in the Selected
`Fields list where the new fields should appear and (optional) then click on the >>
`button.
`. To remove a field from the Selected Fields list, double-click on that field, or
`click on the field and then click on the < button.
`. To remove all fields from the Selected Fields list, click on the << button. The
`fields will reappear in the Available Fields list.
`
`alJlglil,r,rtlr
`Use this Form
`Wízord dialog
`box to specif
`which fields
`should appear
`on your form.
`You cqn select
`fíelds from qs
`many tables
`and queries as
`you wish.
`Access will use
`your selections
`to decide how to
`lay out the form.
`
`Form Wizard
`
`r-ltËäl
`lgl *-g
`lrrE: I
`
`\lhich fields doyw w¿nt mJour fm?
`Yø cæ chæse lrom ffie thil one lðble or quert.
`
`$elected Fields:
`
`lables/Queries:
`fT-r.r---*--ñ--;i
`--
`-.'_-
`t ---
`$vailable FieHs:
`
`1
`
`J
`
`llont¿ctFirstN ame
`llontdclLdslNðme
`EillinqAddress
`rlity
`5tåtÊllrPrDVirlce
`Fost¿lll¡de
`
`J
`
`Ìl
`-,
`-J
`-il
`
`t:arcet |
`
`,,1 T !""t r--l
`
`tÈìish I
`
`
`
`432
`
`CHAPTER 11 . CREATINC FORMS WITH FORM WIZARDS
`
`7, lf you chose fields from multiple tables, but haven't yet defined relationships
`between the tables, the Wizard will display the dialog box shown below. Click on
`OK if you want to exit the Wizard and define relationships (see Chapter 6) or click
`on Cancel to return to step 6 and remove some fields from your form.
`
`/.\ Yuhæeclmsfieklsfrmrhèætdæ I
`/ ! \ Cu.r*æ, Brdss.Order Ddails: or¿ o rsa of ttp I
`tõbbs isn't rdôted t'o the dhers. ffi< 0K ts sd
`-
`systm rdatimhips (¡u:l med lo redat the wizad| |
`Click C¿ned to rdr¡n lo tle wizsd ad lm
`smfels.
`lî--nK-*=¡l cäEd f
`
`I
`
`I
`
`I I
`
`I
`
`8. In the next dialog box or two, you'll be asked to choose a layout of Columnar, Tab-
`--.-----__
`ular, Datasheet, Justified, Form With Subform(s), or Linked Forms, depending on
`which tables and fields you selected in step 6. Choose the options you want and
`then click on Next to continue to the next dialog box.
`
`As you make choices in the dialog boxes described in steps 8 and 9, the Wizard will
`glve you detailed instructions and show previews of your form as it takes shape.
`Just watch the screen carefully and you shouldn't have any trouble figuring out
`what to do.
`
`9. Choose a style by clicking on one of the available styles and then click on Next. For
`maximum readability, choose the Standard style. (As Chapter 13 explains, you can
`customize the styles and create new ones of your own. Later in this chapter we'll
`show you how to change a form's style instantly.)
`1O. Accept or change the suggested title(s) in the last Form Wizard dialog box (see Fig-
`ure 11.11), choose the option that lets you view or enter information (because this
`option usually is most convenient), and then click on Finish.
`i
`
`vt7Ã.
`The title you select in step 10 is used for the form name, the form's Caption prop-
`erty (which displays text on the form's title bar), the command button's Caption
`property (which displays text on the command button of a main form that has a
`linked form), and the Visual Basic code that Access creates behind the form. lf
`the form already ex¡sts ¡n the database, you'll have a chance to overwrite the
`existing form or choose a different title.
`
`
`
`oñ3G I
`
`Eô
`rggl
`et!
`U
`
`0,,
`
`USINC WIZARDS TO CREATE A FORM
`
`.433
`
`llEEUt''!'l
`The final Form
`Wizord diolog
`box. lt's often
`easiest to accePt
`the default set-
`tings and click
`on Finish. Thís
`example shows q
`finoldiolog box
`for a form wíth
`Iinked subforms;
`the finol dialog
`box for a simple
`form without
`subforms is
`similqr.
`
`!/izald
`
`Whal title do try mnt lot each linked fom?
`Firstform: FMñR
`Second lorm:
`
`Sublsm: @
`That's d llæ inlotmatim tle w¡?dd needs to creôte yout
`lhked føms.
`Do you wmt lo æen the main form or modify the desþn of lhe
`fo¡m?
`fî Qpen the main form to view s entã irìlormd¡on.
`i^ [odify the desþof the lsms.
`
`l.,l Disd¿yHelp oì working with the forms?
`
`carcd I
`
`<!aek I
`
`linish
`
`11. (Optionat) Resize or maximize the form that Access created for you. As long as the
`form is not maximized, you can choose Window Þ Size To Fit Form to get a nice
`snug fit of the form window around the form's fields.
`
`After your form appears in form view, you can
`. Use your form to edit existing records or add new ones (see "Opening and Using
`a Form").
`. Edit or add recorcls in datasheet view. To switch to datasheet view, choose View Þ
`Datasheet View, or click on the drop-down al'tow button next to the Form View
`toolbar button and choose Datasheet View.
`. Change the form's design in design view, as explained in Chapter 13. To switch to
`design view, click on the Form View toolbar button or choose View Þ Design
`View, or click on the drop-down arrow button next to the Form View button ancl
`choose Design View. Typically, you'll just need to rearrange or widen thq fields
`and labels. You had a chance to rearrange and resize fields in the Chapter 3
`hands-on lessons.
`o Print or print preview the form (see Chapters 3 and 9).
`. Sort or filter the records, or search for records that meet specific criteria (see Chap-
`ters 3 and 9).
`. Save and close the form (iee "saving a Form" later in this chapter).
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`The kinds of reports the Wizard can create
`
`Using Wizards to create a report
`
`Saving a report
`
`Opening a report
`
`Changing the style for a report
`
`448
`
`455
`
`470
`
`470
`
`471
`
`
`
`Creating Reports
`with Report Wizards
`
`or most of us, printing the data
`stored in tables or the information
`gathered from queries is an essential
`part of using a database. Access Report Wizards provide easy-to-use-yet powerful(cid:173)
`tools for creating reports in several predefined formats. Even if you plan to customize
`the designs later (as we did in many examples shown in this chapter), you'll save time
`if you use the Report Wizards to set up reports.
`
`Chapter 3 explains how to work with Wizards and gives you hands-on practice
`with Report Wizards. Chapter 9 covers printing. In Chapter 1 3, you'll learn how to
`design forms and reports from scratch and how to customize existing designs.
`
`If you need more help with designing a new report, open the Working With Reports
`book in the Access Help Contents and explore subtopics in the Basics and other books. Or
`double-click on Reports, Creating in the Help Index and explore the subtopics that appear.
`
`
`
`448
`
`CHAPTER 12 • CREATING REPORTS WITH REPORT WIZARDS
`
`What Hinds of Reports Can the Wizards Crea ?
`
`The Report Wizards can create several types of reports showing fields from one or more
`tables and/or queries. To help you decide which type of Wizard-designed report might
`be best for your own data, we'll show some examples. Then we'll explain how to create,
`save, and use Wizard-generated reports.
`
`Columnar (Vertical) Re
`In a columnar or vertical report, each field appears on a separate line with a label to its
`left. Figure 12.1 shows a sample columnar report for the Products table.
`
`You can customize the styles available in Report Wizards. To get started, open any
`report in design view and choose Format> AutoFormat or click on the AutoFormat
`button on the Report Design toolbar. In the AutoFormat dialog box, click on the for(cid:173)
`mat you want to customize and then click on the Customize button.
`
`Tabular Reports
`Figure 12.2 shows a tabular report for the Products table. As you can see, tabular reports
`display fields in a horizontal row with field labels at the top of the report. Each new row
`represents a new record.
`
`roups, Totals, and Summa
`Groups/totals reports such as the one shown in Figure 12.3 organize your data into
`groups that appear in tabular format. At your request, the Wizard will calculate sum,
`average, minimum, and maximum values for numeric and curi-ency fields in each
`group and display sums as percentages of totals.
`The group/totals report shown in Figure 12.3 is based on the query shown in
`Figure 12.4. The calculation in the last column of the query is as follows:
`
`$ Before Tax:CCur([Quantity]*
`[Order Detai 1 s]. [Uni tPri ce] * (1- [Discount]))
`
`Summary reports are just like group/totals reports except that they omit the detail
`records between each group. Figure 12.5 shows a report that's almost the same as Fig(cid:173)
`ure 12.3, only designed as a summary report. (We omitted the Product Name field in
`Figure 12.5.) This report is based on the query shown in Figure 12.4.
`
`
`
`li~3Jlillfll
`A columnar
`report for the
`products table
`in the Soft
`Gray style.
`
`WHAT KINDS OF REPORTS CAN THE WIZARDS CREATE?
`
`449
`
`"'
`
`Product 10
`
`Product Name
`
`Basketball
`
`Unit Price
`
`Product 10
`
`Product Name
`
`Football
`
`Unit Price
`
`Product 10
`
`Product Name
`
`Soccer ball
`
`Unit Price
`
`Product 10
`
`Product Name
`
`Volleyball
`
`Unit Price
`
`Product 10
`
`Product Name
`
`Golf balls
`
`Unit Price
`
`Product 10
`
`Product Name
`
`Crystal ball
`
`Unit Price
`
`Product 10
`
`Product Name
`
`Baseball
`
`Unit Price
`
`Product 10
`
`L
`
`$4.95.
`
`2
`
`$5.65
`
`3,
`
`$12.95
`
`4
`
`$3.25
`
`5
`
`$6.75
`
`6
`
`$45.55
`
`7
`
`$8.75
`
`8
`
`Product Name
`
`Billiard balls
`
`Unit Price
`
`$127.45
`
`Tuesday, September 05, 1995
`
`Page 1 of 2
`
`Q)
`
`"' 11:1
`
`..Q
`11:1
`~
`11:1
`Q
`11:1
`
`t:il c:
`-;;::;
`tG
`....
`Q)
`v
`
`
`
`450
`
`CHAPTER 12 • CREATING REPORTS WITH REPORT WIZARDS
`
`lil3Q;llf§M
`A tabular report
`for the Products
`table in the
`Bold style.
`The tabular
`layout is best
`when you have
`just a few
`narrow fields to
`display and you
`want to see
`many records on
`a single page.
`
`Products
`
`"
`
`Product ID Product Name
`
`Unit Price
`
`Basketball
`
`2 Football
`
`3 Soccer ball
`
`4 Volleyball
`
`5 Golfballs
`
`6 Crystal ball
`
`7 Baseball
`
`8 Billiard balls
`
`9 Tether ball
`
`10 Foosball
`
`$4.95
`
`$5.65
`
`$12.95
`
`$3.25
`
`$6.75
`
`$45.55
`
`$8.75
`
`$127.45
`
`$9.65
`
`$17.85
`
`Tuesday, September 05, 1995
`
`
`
`WHAT KINDS OF REPORTS CAN THE WIZARDS CREATE?
`
`451
`
`lll!l!illlillllllllll!llll!llll!llll!llll!i!!l!lllllllll!i!llillll!ll!!llllllllllll!lll!!ll!ll!llllilllllilllllllllllll!lllllllllllilll!ll!!!llllllil!llij!l!llllllilllllll!lll!!llll!lll!!ll!l!l!!!
`
`Orders by Date
`
`BSIII!IIIlMIIBIIIi!lll~ll!llllU11Hlll!!i'lllmJIIBit11illii1WIIt.lllllifllmlllfiBII!!Il11WIIWIIMili'§Uil!!lii911Wilelllll!liOOiit£91iMUSIIWIIWII!illiWilj)j1ilm'l!i&ill
`2/1/95
`
`Order Date
`
`Product Name
`
`Basketball
`
`Billiard balls
`
`Football
`
`Quantity
`
`Unit Price
`
`2
`
`$4.95
`
`$127.45
`
`$5.65
`
`$5.65
`Football
`••Hm-•~""-''"""""''""-""-"""' ··--·-··----·-·-·-···-··-·--··-····-····" """-"""""""""-•--·-"'''""""'"-"""m'""""_'_""'""
`Summary for 'OrderDate' = 2/1/95 (4 detail records)
`5
`Sum
`1.25
`Avg
`Min
`Max
`Percent
`
`$35.93
`$4.95
`$127.45
`
`2
`6.49%
`
`Discount $Before Tax
`
`0.00%
`
`0.00%
`
`0.00%
`
`0.00%
`
`$4.95
`
`$254.90
`
`$5.65
`
`$5.65
`
`••'""-""""'"-"-"""-"""'--"'""""'"'"--"""'""""""""-"
`
`••"""""""--•••m-•••"'""--""'"'"
`
`0.00%
`0.00%
`0.00%
`
`$271.15
`$67.79
`$4.95
`$254.90
`16.48%
`
`A Casual style
`groups/total
`report that's
`grouped by
`Order Date and
`subtotaled on
`numeric and
`currency fields.
`This report is in
`Outline 1 form.
`We tailored the
`appearance of
`this report after
`the Report Wiz(cid:173)
`ard created it.
`
`Unit Price
`
`Discount $Before Tax
`
`Order Date
`
`P