1 all powder board and ski microsoft access workbook chapter 6: forms and reports jerry post...
TRANSCRIPT
![Page 1: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/1.jpg)
1
All Powder Board and Ski
Microsoft Access WorkbookChapter 6: Forms and ReportsJerry PostCopyright © 2007
![Page 2: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/2.jpg)
2
Form Types
Style Style Description CategoryCustomer
Last NameFirst NamePhoneAddressCity
Ski Board Style
Sale
Customer Salesperson
ItemID Description Price Quantity Value
Main
Grid
Main and
Subform
![Page 3: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/3.jpg)
3
Customer Main Form
Combo box
Record navigation
Text boxLabel
![Page 4: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/4.jpg)
4
Action
ActionStart the form wizardSelect the Customer tableTransfer all columns to the right windowUse the Columnar layoutSelect a styleEnter a name for the form
![Page 5: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/5.jpg)
5
Main Form Wizard
Select table Select/transfer fields
![Page 6: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/6.jpg)
6
Form Design View
Toolbox to add controls
Properties to control objects
Right click to open control properties
Right click to open form properties
Switch to design or display view
Field List Box
![Page 7: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/7.jpg)
7
Data Source Properties
Record Source = Customer table
Form properties Control properties
Control Source = CustomerID column
![Page 8: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/8.jpg)
8
Action
ActionSwitch Customer form to design viewAdd a label as a form titleAdd a command buttonSelect Record Operation/Delete RecordAdd a command button to insert recordsRun the form and test the buttonsView/Tab Order and verify sequenceSave the form
![Page 9: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/9.jpg)
9
Adding Command Buttons
![Page 10: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/10.jpg)
10
Initial Grid Form
![Page 11: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/11.jpg)
11
Action
ActionCreate a new form with the wizardTable: SkiBoardStyleColumns: AllSelect the Datasheet layoutTest the form
![Page 12: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/12.jpg)
12
Grid Form Wizard
Datasheet style is simpler than Tabular
Tabular style has more design options
![Page 13: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/13.jpg)
13
Action
ActionSwitch to form Design viewDelete the box for CategoryAdd a combo boxSelect the first lookup optionChoose the ProductCategory tableChoose the Category and CategoryDescription columnsSet column widthsSelect the Category columnStore value into the Category columnRename the combo boxSet the tab orderRun the form and test the combo box
![Page 14: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/14.jpg)
14
Add a Combo Box
Delete the text box
Add a combo box
![Page 15: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/15.jpg)
15
Combo Box Role
SkiBoardStyle
Style Desc Category
Downhill Ski
ProductCategory
BoardBootsClothesElectronicGlassesSki
Display
Select
![Page 16: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/16.jpg)
16
Combo Box Runtime
Click the arrow
Select the item
Chosen value is transferred to form
![Page 17: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/17.jpg)
17
Action
ActionCreate a new form with the wizardSale table, all columnsCustomer table use name, phone, and e-mail columnsEmployee table, use the nameSaleItem table, all columns except SaleIDItemModel table, use Category, ModelID, and ListPriceFinish the wizard and test the form
![Page 18: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/18.jpg)
18
Main/Subform by Sale
![Page 19: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/19.jpg)
19
Initial Sale Form
Need combo box
Fix layout and sizing
Multiply price by quantity Calculate subtotal
![Page 20: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/20.jpg)
20
Action
ActionSwitch to Design viewReplace CustomerID, EmployeeID, and
PaymentMethod with combo boxesUse the Row Source property of the combo
boxes to set a sort orderSet tab order and run the form
![Page 21: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/21.jpg)
21
Initial Sale Form Improvements
![Page 22: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/22.jpg)
22
Most of the Sale Form
Display the subtotal
![Page 23: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/23.jpg)
23
Action
ActionOpen the sub form in Design viewInsert a combo box for the SKUAdd a text box to compute Value=QuantitySold*SalePriceAdd a text box to the footer to compute the subtotal:
=Sum(QuantitySold*SalePrice)Set tab orderTest the sub form calculationsOpen the main form in Design viewAdd subtotal text box and use the expression builder to copy the
subtotal value from the subfrom subtotalTest the form
![Page 24: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/24.jpg)
24
Expression Builder to Copy Subtotal
Open the Sale form
Select the subform
Double click the subtotal control
Formula to copy the subtotal value
![Page 25: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/25.jpg)
25
Final Sale Form
![Page 26: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/26.jpg)
26
Action
ActionCreate a new report with the wizardCustomer table, use all columnsSale table, use all columnsSaleItem table, use all columnsVerify the group breaksClick the Summary Options buttonCompute totals for the QuantityFinish the wizard and switch to design view
![Page 27: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/27.jpg)
27
Customizing Form Properties
Form properties
Text box
![Page 28: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/28.jpg)
28
Action
ActionMake a copy of the Customer form.In Design View, add a header.Drag the Customer title onto the header.Set the background color of the header to yellow.
![Page 29: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/29.jpg)
29
Create the Customer Sales Report
Select all columns from the Customer, Sale, and SaleItem tables
Customer break
Sale break
SaleItem detail
![Page 30: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/30.jpg)
30
Action
ActionCreate a new report with the wizard
![Page 31: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/31.jpg)
31
Report Summary Options
Select this button to calculate subtotals easily
![Page 32: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/32.jpg)
32
Summary Options
![Page 33: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/33.jpg)
33
Initial Report
Customer break
Sale break
SaleItem detail
![Page 34: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/34.jpg)
34
Report Design
Customer break
Sale break
SaleItem detail
Value textbox properties
![Page 35: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/35.jpg)
35
Action
ActionDelete some unnecessary columnsMove items around to improve the lookAdd a text box in the Detail section called Value
to compute [QuantitySold]*[SalePrice]Set currency formatEdit the Sum calculations to be
Sum([QuantitySold]*[SalePrice]Run the form and clean up the layout
![Page 36: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/36.jpg)
36
Final Design
Page break
Correct total
![Page 37: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/37.jpg)
37
Final Report (One Page)
![Page 38: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/38.jpg)
38
Action
ActionCreate a new query to total sales by customerSave the queryCreate a new report based on the queryFor the Customer group, set the Keep Together
property to Whole GroupRun the report
![Page 39: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/39.jpg)
39
Customer Totals Without Items
SELECT Customer.CustomerID, Customer.LastName, Customer.FirstName, Customer.Phone, Customer.EMail, Sale.SaleID, Sale.SaleDate, Sale.ShipCity, Sale.ShipState, Sum([SalePrice]*[QuantitySold]) AS [Value]
FROM (Customer INNER JOIN Sale ON Customer.CustomerID = Sale.CustomerID) INNER JOIN SaleItem ON Sale.SaleID = SaleItem.SaleID
GROUP BY Customer.CustomerID, Customer.LastName, Customer.FirstName, Customer.Phone, Customer.EMail, Sale.SaleID, Sale.SaleDate, Sale.ShipCity, Sale.ShipState
ORDER BY Customer.LastName, Customer.FirstName;
![Page 40: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/40.jpg)
40
Sales Total Design
![Page 41: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/41.jpg)
41
Action
ActionCreate a simple report based on the Customer tableCreate a Sale sub-report from the Sale and SaleItem tables,
grouping it by SaleItem.Create a Rental sub-report from the Rental and RentalItem tablesOpen the Customer report in design viewDrag and drop the two sub-reports onto the Detail section of the
Customer reportUse properties of the sub-reports to set the Link Child and Link
Master Fields to CustomerIDRun the report
![Page 42: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/42.jpg)
42
Subreport: Sales and Rentals
Subreport properties
Link main customer report (master) to subreport (child)
![Page 43: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/43.jpg)
43
Subreport Display
![Page 44: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/44.jpg)
44
Action
ActionCreate a blank form in Design viewSet the properties to remove the scroll bars and
navigation buttonsAdd command buttons to open other forms (Form
Operations/Open Form) and reportsUse colors and graphics to make the form appealingRun the form and test all buttons
![Page 45: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/45.jpg)
45
Creating a Switchboard Form
Start in design view
Add command buttons
Open forms or reports
![Page 46: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/46.jpg)
46
Action
ActionChoose View/Toolbars/CustomizeOn the Toolbars tab create a new toolbarClick the Commands tabDrag the main form icon onto the toolbarAdd a Customers menu option and drag the
customer forms and reports onto itAdd the Help iconTest the toolbar
![Page 47: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/47.jpg)
47
Creating Toolbars and Menus
Create a new toolbar
![Page 48: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/48.jpg)
48
Toolbars and Menus
Drag commands onto the toolbar
![Page 49: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/49.jpg)
49
Action
ActionCreate at least three HTML help files for the All Powder forms using
an HTML editor or WordpadIf necessary, download and install the HTML Help workshopCreate a new project in the workshopAdd the HTML filesEdit the HTML files to add keywordsCreate the mapping file with a text editor and add it to the projectSet project options to build the TOC and index filesCompile and test the help fileEdit the database forms and add the help file name and ContentIDRun the form and press the F1 key to test the help files
![Page 50: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/50.jpg)
50
HTML Help
Form
Help File
AllPowder.chm
HTML Topic
HTML Topic
HTML Topic
HTML Topic
HTML Topic
HTML Topic
Properties:
Help File: AllPowder.chm
Help Context ID: 1
1 Topic A2 Topic B3 Topic C4 Topic D5 Topic E6 Topic F
compile
![Page 51: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/51.jpg)
51
HTML Help Files<Object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <PARAM name="Keyword" value="Contents"> <PARAM name="Keyword" value="Introduction"> <PARAM name="Keyword" value="Start"> <PARAM name="Keyword" value="Management"></OBJECT><HTML><HEAD><TITLE>All Powder Board and Ski Shop</TITLE><LINK rel="stylesheet" type="text/css" href="Styles.css"></HEAD><BODY><H1>Introduction to the All Powder Board and Ski Shop</H1><TABLE><TR><TD><IMG SRC='BoardLogo1.gif' border='0'></TD><TD>All Powder Board and Ski Shop sells and rents snowboards and skis for all levels of riders and skiers.</TD></TR></TABLE><H2>The Board and Ski Shop</H2><UL><LI><A HREF=’Customers.html'>Customers</A></LI><LI><A HREF=’Sales.html'>Sales </A></LI></UL></BODY></HTML>
![Page 52: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/52.jpg)
52
Topics Map File
#define AllPowder 100
#define Customers 10000
#define Sales 20000
![Page 53: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/53.jpg)
53
Help Compiler and File
![Page 54: 1 All Powder Board and Ski Microsoft Access Workbook Chapter 6: Forms and Reports Jerry Post Copyright © 2007](https://reader033.vdocuments.mx/reader033/viewer/2022061306/551472c4550346494e8b613e/html5/thumbnails/54.jpg)
54
Help File on Access Form
File name
Topic number