microsoft access – tutorial 3 performing calculations copy the highwageamounts query and paste it...

14
Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design View select and drag so that the fields HoursPerWeek, Experience, StartDate, EndDate and Openings are selected delete them by clicking the delete key delete the remaining fields except EmployerName, PositionTitle and Wage move these fields into the order above select the blank field to the right of Wage click the Build button (magic wand) in the toolbar to open the Expression Builder

Upload: matilda-hodges

Post on 18-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 3Performing Calculationscopy the HighWageAmounts query and paste itname it HighWageAmountsWithBonus and open it in Design

View select and drag so that the fields HoursPerWeek,

Experience, StartDate, EndDate and Openings are selecteddelete them by clicking the delete keydelete the remaining fields except EmployerName,

PositionTitle and Wagemove these fields into the order aboveselect the blank field to the right of Wageclick the Build button (magic wand) in the toolbar to open the

Expression Builder

Page 2: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 3Performing CalculationsHighWageswithBonus query should already be selectedwe will add a 2% bonus to the Wageclick Wage in the field list and the Paste button above type the multiply operator (*) and paste HoursPerWeek after

itnow multiply that by .02click OK to finish the expressiongo to the left of the expression (click Home) and give it the

name WeeklyBonus: (you must include the :)click the Show checkbox, if necessary and run the query

Page 3: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 3Performing Calculationsnotice that some of the fields have three decimal placesswitch back to Design View right-click the WeeklyBonus field and select Properties format this field as fixed with 2 decimal placesgive it the Caption Weekly Bonus and run it again

Page 4: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 3Aggregate Functions (totals, averages…)create a new query in design viewopen the AvailablePositions table and add the Wage field

three timesclick the totals (sum) button on the toolbara new row called Totals appearsclick the arrow beside it to see what aggregate functions are

availableselect Min to display the Minimum Wagename it by adding Minimum Wage: before Wage in the Field

rowcreate AverageWage and Maximum Wage statistics using

the remaining fields save the Query as WageStatistics

Page 5: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 3Record Group Calculationswe want to get the statistics for each positioncopy and paste the query WageStatistics and name it

WageStatisticsbyPosition and open it in Design Viewadd PositionTitle to the fields leave the Total row in the default position of Group By run the query and you will see statistics for each positionsave and close

Page 6: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Forms and Reports copy the database NortheastFormsReports onto your disk or Documents

and open it select Forms in the Object Bar click createform by using wizard select the AvailablePositions Table add fields in the following order:

PositionID, PositionTitle, EmployerID, Wage, HoursPerWeek, StartDate, EndDate, Openings, Experience

click Next and look at the various layout options in the Preview Window choose the Columnar table and click Next look at the various Styles available choose Expedition and click Next give it the name Positions Data and Finish

Page 7: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Changing the Form’s Autoformatas with Excel, you can Autoformat the look of itemsswitch to Design Viewclick the Autoformat button in the toolbarclick the Options buttonyou can turn different attributes on and offselect Standard to make the form easier to readclick OKclick the View button to see the form properlyclick Saveas usual, you can Navigate through the records with the

buttons on the bottom

Page 8: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Finding Data with a Formyou can use forms to find records with specific dataclick in the EmployerID fieldclick the Find (binoculars) button on the toolbar the Find and Replace dialog box will appear type 10145 to find the Positions for the Employer The

Clipper Ship Innyou can also use wildcard (*) characters to search

(a list of wildcards can be found on page AC137) type 1018* in the searchnote that it finds data for two employers

Page 9: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Updating, Adding, Deleting and Printing Recordsyou can update records by going to the correct record and

changing the informationwhen on a record, you can also delete it by clicking the

Delete Record button on the toolbaryou can add new records by clicking the Add Record button

you can print form recordsselect record 42click on the PositionID (Primary Key) filed to select this

recordFile>Print and check Selected Record(s) to print only this

record

Page 10: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Forms based on Two Tables (Main and SubForms)go to the Form Wizard to create a form based on two related tables, you first select

the Primary table (Employer)add EmployerID, EmployerName, ContactFirstName,

ContactLastName and Phonenext select the related table (AvailablePositions) and add all

the fieldsbecause EmployerID was already included you can remove

the field AvailablePositions:EmployerIDclick Next

Page 11: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Forms based on Two Tables (Main and SubForms) look at the different layouts availableview the data by Employer in a Form with Subforms and

click Nextwe will use the Datasheet layout; click Nextand the Standard style; click Nextcall the main form Employer Positionsclick Finishnavigate through some records to explore this view to widen the SubForm, switch to Design Viewdrag the Subform window to the right to widen itswitch back to Form View to check itclose and save it

Page 12: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Creating Reportswe will create a report similar to the form we just madecreate a Report using the Wizard from the Employer table add:

EmployerID, EmployerName, City, StateProv, ContactFirstName, ContactLastName and Phone

then add all the fields from the AvailablePositions table remove the redundant EmployerID field and click Nextexplore some of the Grouping options availabel qand see

how the preview changes remove any grouping options you tried and click Nextnote that you can sort information; click Next

Page 13: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Creating Reportsexplore the Layout optionsselect Outline 2 in the Landscape orientation; click Nextexplore the Style optionsselect Corporate and click Nextname the Report Employers and Positions and Finish to view the Report click the View buttonZoom in and out as necessary

Page 14: Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design

Microsoft Access – Tutorial 4Creating Reports return to Design Viewexperiment with the Design and Layout of the labels and

datanote that you can drag and drop items onto the Report to

make Custom Designsuse Insert the Globe illustration into the header before you

save