Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 6: Forms, Reports and Applications All Powder Board and Ski

Similar presentations


Presentation on theme: "Chapter 6: Forms, Reports and Applications All Powder Board and Ski"— Presentation transcript:

1 Chapter 6: Forms, Reports and Applications All Powder Board and Ski
Designing & Building Business Applications Microsoft® Access Jerry Post Chapter 6: Forms, Reports and Applications All Powder Board and Ski

2 Form Types Ski Board Style Style Style Description Category Customer
Grid Last Name First Name Phone Address City Sale Main Customer Salesperson ItemID Description Price Quantity Value Main and Subform

3 Customer Main Form Text box Label Combo box Record navigation

4 Action Action Start the form wizard Select the Customer table
Transfer all columns to the right window Use the Columnar layout Select a style Enter a name for the form

5 Main Form Wizard Select table Select/transfer fields

6 Form Design View Field List Box Switch to design or display view
Toolbox to add controls Right click to open form properties Right click to open control properties Properties to control objects

7 Data Source Properties
Record Source = Customer table Control Source = CustomerID column Form properties Control properties

8 Action Action Switch Customer form to design view
Add a label as a form title Add a command button Select Record Operation/Delete Record Add a command button to insert records Run the form and test the buttons View/Tab Order and verify sequence Save the form

9 Adding Command Buttons

10 Initial Grid Form

11 Action Action Create a new form with the wizard Table: SkiBoardStyle
Columns: All Select the Datasheet layout Test the form

12 Grid Form Wizard Tabular style has more design options
Datasheet style is simpler than Tabular

13 Action Action Switch to form Design view Delete the box for Category
Add a combo box Select the first lookup option Choose the ProductCategory table Choose the Category and CategoryDescription columns Set column widths Select the Category column Store value into the Category column Rename the combo box Set the tab order Run the form and test the combo box

14 Add a Combo Box Add a combo box Delete the text box

15 Combo Box Role Display ProductCategory SkiBoardStyle Select Board
Boots Clothes Electronic Glasses Ski SkiBoardStyle Select Style Desc Category Downhill Ski

16 Combo Box Runtime Click the arrow Select the item
Chosen value is transferred to form

17 Action Action Create a new form with the wizard
Sale table, all columns Customer table use name, phone, and columns Employee table, use the name SaleItem table, all columns except SaleID ItemModel table, use Category, ModelID, and ListPrice Finish the wizard and test the form

18 Main/Subform by Sale

19 Initial Sale Form Fix layout and sizing Need combo box
Multiply price by quantity Calculate subtotal

20 Action Action Switch to Design view
Replace CustomerID, EmployeeID, and PaymentMethod with combo boxes Use the Row Source property of the combo boxes to set a sort order Set tab order and run the form

21 Initial Sale Form Improvements

22 Most of the Sale Form Display the subtotal

23 Action Action Open the sub form in Design view
Insert a combo box for the SKU Add a text box to compute Value=QuantitySold*SalePrice Add a text box to the footer to compute the subtotal: =Sum(QuantitySold*SalePrice) Set tab order Test the sub form calculations Open the main form in Design view Add subtotal text box and use the expression builder to copy the subtotal value from the subfrom subtotal Test the form

24 Expression Builder to Copy Subtotal
Formula to copy the subtotal value Open the Sale form Select the subform Double click the subtotal control

25 Final Sale Form

26 Action Action Create a new report with the wizard
Customer table, use all columns Sale table, use all columns SaleItem table, use all columns Verify the group breaks Click the Summary Options button Compute totals for the Quantity Finish the wizard and switch to design view

27 Create the Customer Sales Report
Select all columns from the Customer, Sale, and SaleItem tables Customer break Sale break SaleItem detail

28 Report Summary Options
Select this button to calculate subtotals easily

29 Summary Options

30 Initial Report Customer break Sale break SaleItem detail

31 Report Design Customer break Sale break SaleItem detail
Value textbox properties

32 Action Action Delete some unnecessary columns
Move items around to improve the look Add a text box in the Detail section called Value to compute [QuantitySold]*[SalePrice] Set currency format Edit the Sum calculations to be Sum([QuantitySold]*[SalePrice] Run the form and clean up the layout

33 Final Design Page break Correct total

34 Final Report (One Page)

35 Action Action Create a new query to total sales by customer
Save the query Create a new report based on the query For the Customer group, set the Keep Together property to Whole Group Run the report

36 Customer Totals Without Items
SELECT Customer.CustomerID, Customer.LastName, Customer.FirstName, Customer.Phone, Customer. , 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. , Sale.SaleID, Sale.SaleDate, Sale.ShipCity, Sale.ShipState ORDER BY Customer.LastName, Customer.FirstName;

37 Sales Total Design

38 Action Action Create a simple report based on the Customer table
Create a Sale sub-report from the Sale and SaleItem tables, grouping it by SaleItem. Create a Rental sub-report from the Rental and RentalItem tables Open the Customer report in design view Drag and drop the two sub-reports onto the Detail section of the Customer report Use properties of the sub-reports to set the Link Child and Link Master Fields to CustomerID Run the report

39 Subreport: Sales and Rentals
Link main customer report (master) to subreport (child) Subreport properties

40 Subreport Display

41 Action Action Create a blank form in Design view
Set the properties to remove the scroll bars and navigation buttons Add command buttons to open other forms (Form Operations/Open Form) and reports Use colors and graphics to make the form appealing Run the form and test all buttons

42 Creating a Switchboard Form
Start in design view Add command buttons Open forms or reports

43 Action Action Choose View/Toolbars/Customize
On the Toolbars tab create a new toolbar Click the Commands tab Drag the main form icon onto the toolbar Add a Customers menu option and drag the customer forms and reports onto it Add the Help icon Test the toolbar

44 Creating Toolbars and Menus
Create a new toolbar

45 Toolbars and Menus Drag commands onto the toolbar

46 Action Action Create at least three HTML help files for the All Powder forms using an HTML editor or Wordpad If necessary, download and install the HTML Help workshop Create a new project in the workshop Add the HTML files Edit the HTML files to add keywords Create the mapping file with a text editor and add it to the project Set project options to build the TOC and index files Compile and test the help file Edit the database forms and add the help file name and ContentID Run the form and press the F1 key to test the help files

47 HTML Help compile Help File AllPowder.chm HTML Topic HTML Topic
1 Topic A 2 Topic B 3 Topic C 4 Topic D 5 Topic E 6 Topic F HTML Topic HTML Topic Form HTML Topic HTML Topic Properties: Help File: AllPowder.chm Help Context ID: 1

48 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>

49 Topics Map File #define AllPowder 100 #define Customers 10000
#define Sales 20000

50 Help Compiler and File

51 Help File on Access Form
File name Topic number

52 Designing & Building Business Applications Microsoft® Access Jerry Post
End of Chapter 6


Download ppt "Chapter 6: Forms, Reports and Applications All Powder Board and Ski"

Similar presentations


Ads by Google