tutorial 4 creating forms and reports - koç...

30
Microsoft Access 2013 ® ® Tutorial 4 Creating Forms and Reports

Upload: lamtram

Post on 05-Feb-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

Microsoft Access 2013® ®

Tutorial4CreatingFormsandReports

Page 2: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPObjectives• Session4.1– CreateaformusingtheFormWizard– Applyathemetoaform– Addapicturetoaform– Changethecoloroftextonaform– Findandmaintaindatausingaform– Previewandprintselectedformrecords– Createaformwithamainformandasubform

NewPerspectivesonMicrosoftAccess2013 2

Page 3: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPObjectives(Cont.)• Session4.2– CreateareportusingtheReportWizard– Applyathemetoareport– Changethealignmentoffieldvaluesonareport–Moveandresizefieldsinareport– Insertapictureinareport– Changethecoloroftextonareport– Applyconditionalformattinginareport– Previewandprintareport

NewPerspectivesonMicrosoftAccess2013 3

Page 4: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingFormsandReports

• Case- ChathamCommunityHealthServicesUsingFormsandReportstoDisplayPatientandVisitData

– UserwantsthedatabasetoincludeaformbasedonthePatienttabletomakeiteasierforstaffmemberstoenterandchangedataabouttheclinic’spatients

– AlsowantsthedatabasetoincludeaformthatshowsdatafromboththePatientandVisittablesatthesametime

– Wouldliketoincludeaformattedreportofpatientandvisitdatasotheywillhaveprintedoutputwhencompletingpatientanalysesandplanningstrategiesforcommunityoutreachefforts

NewPerspectivesonMicrosoftAccess2013 4

Page 5: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingFormsandReports(Cont.)

NewPerspectivesonMicrosoftAccess2013 5

Page 6: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingFormsandReports(Cont.)

NewPerspectivesonMicrosoftAccess2013 6

Page 7: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingaFormUsingtheFormWizard

• A formisanobjectyouusetoenter,edit,andviewrecordsinadatabase– Youcandesignyourown

formsorhaveAccesscreate themforyouautomatically

NewPerspectivesonMicrosoftAccess2013 7

Page 8: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingaFormUsingtheFormWizard(Cont.)

NewPerspectivesonMicrosoftAccess2013 8

Page 9: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPModifyingaForm’sDesigninLayoutView

NewPerspectivesonMicrosoftAccess2013 9

• YoumightneedtomodifyitsdesigninLayoutviewtoimproveitsappearanceortomaketheformeasiertouse• InLayoutview,youseetheformasitappearsinForm

view,butyoucanstillmodifytheform’sdesign• InFormview,youcannotmakeanydesignchanges

• Layoutviewmakesiteasyforyoutoseetheresultsofanydesignchangesyoumake• Youcancontinuetomakechanges,undomodifications,

andreworkthedesigninLayoutviewtoachievethelookyouwantfortheform

Page 10: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPModifyingaForm’sDesigninLayoutView(Cont.)

• ApplyingaThemetoaForm– Bydefault,aformsusetheOfficetheme,whichdeterminesthecolorandfontusedontheform

– Accessprovidesmanybuilt-inthemes• Makesiteasytocreateobjectswithaunified look

• Youcanalsocreateacustomized theme ifnoneofthebuilt-inthemessuityourneeds

NewPerspectivesonMicrosoftAccess2013 10

Page 11: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPModifyingaForm’sDesigninLayoutView(Cont.)

NewPerspectivesonMicrosoftAccess2013 11

Page 12: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPModifyingaForm’sDesigninLayoutView(Cont.)

• AddingaPicturetoaForm– Apictureisoneofmanycontrolsyoucanaddandmodifyonaform• Acontrol isanitemonaform, report,orotherdatabaseobjectthatyoucanmanipulate tomodifytheobject’sappearance

NewPerspectivesonMicrosoftAccess2013 12

Page 13: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPModifyingaForm’sDesigninLayoutView(Cont.)

• ChangingtheColoroftheFormTitle– TheFontgroupontheFORMATtabprovidesmanyoptionsyoucanusetochangetheappearanceoftextonaform

NewPerspectivesonMicrosoftAccess2013 13

Page 14: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPNavigatingaForm• Toview,navigate,andchangedatausingaform,youneedtodisplaytheforminFormview– Navigateaforminthesamewaythatyounavigateatabledatasheet

– ThenavigationmodeandeditingmodekeyboardshortcutsyouusedwithdatasheetsinTutorial3arethesamewhennavigatingaform

NewPerspectivesonMicrosoftAccess2013 14

Page 15: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPFindingDataUsingaForm• TheFindcommandletsyousearchfordatainadatasheetsoyoucandisplayonlythoserecordsyouwanttoview

• YoucanalsousetheFindcommandtosearchfordatainaform– Youchooseafieldtoserveasthebasisforthesearchbymakingthatfieldthecurrentfield,andthenyouenterthevalueyouwantAccesstomatchintheFindandReplacedialogbox

NewPerspectivesonMicrosoftAccess2013 15

Page 16: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPFindingDataUsingaForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 16

Page 17: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPMaintaining TableDataUsingaForm

NewPerspectivesonMicrosoftAccess2013 17

• Maintainingdatausingaformisofteneasierthanusingadatasheetbecauseyoucanfocusonallthechangesforasinglerecordatonetime

• InFormview,youcaneditthefieldvaluesforarecord,deletearecordfromtheunderlyingtable,oraddanewrecord

Page 18: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPPreviewingandPrintingSelectedFormRecords

NewPerspectivesonMicrosoftAccess2013 18

• Accessprintsasmanyformrecordsascanfitonaprintedpage– Ifonlypartofaformrecord fitsonthebottomofapage, the

remainder oftherecordprintsonthenextpage

• Accessallowsyoutoprintallpagesorarangeofpages.Inaddition,youcanprintthecurrentlyselectedformrecord

Page 19: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXP

• Tocreateaformbasedontwotables,youmustfirstdefinearelationshipbetweenthetwotables– Whenyoucreateaformcontainingdatafromtwotables thathavea

one-to-many relationship, youactuallycreateamainformfordatafromtheprimarytableandasubform fordatafromtherelated table

– Accessuses thedefined relationship between thetables tojointhemautomaticallythrough thecommonfield thatexists inbothtables

CreatingaFormwithaMainFormandaSubform

NewPerspectivesonMicrosoftAccess2013 19

Page 20: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingaFormwithaMainFormandaSubform(Cont.)

NewPerspectivesonMicrosoftAccess2013 20

Page 21: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingaReportUsingtheReportWizard

NewPerspectivesonMicrosoftAccess2013 21

Page 22: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXP

• A reportisaformattedprintoutorscreendisplayofthecontentsofoneormoretablesorqueriesinadatabase– InAccess,youcancreateyourownreportsorusetheReportWizardtocreatethemforyou

– Youcanalwayschangeareport’sdesignafteryoucreateit

CreatingaReportUsingtheReportWizard(Cont.)

NewPerspectivesonMicrosoftAccess2013 22

Page 23: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingaReportUsingtheReportWizard(Cont.)

NewPerspectivesonMicrosoftAccess2013 23

Page 24: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPCreatingaReportUsingtheReportWizard(Cont.)

NewPerspectivesonMicrosoftAccess2013 24

Page 25: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXP

• ApplyingaThemetoaReport– Thesamethemes available forformsarealsoavailable forreports– Youcanchoose toapplyathemetothecurrent reportobjectonly,or

toallreports inthedatabase

• ChangingtheAlignmentofFieldValues– TheFORMATtabinLayoutview,oneoftheREPORTLAYOUTTOOLS

contextual tabs,provides optionsforyoutoeasilymodifytheformatofvariousreportobjects

ModifyingaReport’sDesigninLayoutView

NewPerspectivesonMicrosoftAccess2013 25

Page 26: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXP

• MovingandResizingFieldsonaReport– WorkinginLayoutview,youcanresizeandrepositionfieldsandfieldvalueboxestoimprovetheappearanceofareportortoaddresstheproblemofsomefieldvaluesnotbeingcompletelydisplayed

ModifyingaReport’sDesigninLayoutView(Cont.)

NewPerspectivesonMicrosoftAccess2013 26

Page 27: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXP

• ChangingtheTitleFontColorandInsertingaPictureinaReport– Youcanchangethecoloroftextonareporttoenhanceitsappearance

– Youcanalsoaddapicturetoareportforvisualinterestortoidentifyaparticularsectionofthereport

ModifyingaReport’sDesigninLayoutView(Cont.)

NewPerspectivesonMicrosoftAccess2013 27

Page 28: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPUsingConditional Formatting inaReport

NewPerspectivesonMicrosoftAccess2013 28

• Conditionalformatting inareport(orform)isspecialformattingappliedtocertainfieldvaluesdependingononeormoreconditions—similartocriteriayouestablishforqueries– Ifafieldvaluemeetstheconditionorconditionsyouspecify,theformattingisappliedtothevalue

Page 29: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPUsingConditional Formatting inaReport(Cont.)

NewPerspectivesonMicrosoftAccess2013 29

Page 30: Tutorial 4 Creating Forms and Reports - Koç Hastanesihome.ku.edu.tr/.../indr481_fall2015/indr481_fall2015_tutorial4.pdf · Microsoft Access 2013 ® ® Tutorial 4 Creating Forms

XPXPXPUsingConditionalFormattinginaReport(Cont.)

NewPerspectivesonMicrosoftAccess2013 30

• ViewingthedatabaseobjectsintheNavigationPane