tutorial 6 using form tools and creating custom...

Post on 30-Jun-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Microsoft Access 2013® ®

Tutorial6UsingFormToolsandCreatingCustomForms

XPXPXPObjectives• Session6.1– ChangealookupfieldtoaShortTextfield– Viewandprintdatabasedocumentation– Createdatasheet,multipleitem,andsplitforms– ModifyaformandanchorformcontrolsinLayoutview

NewPerspectivesonMicrosoftAccess2013 2

XPXPXPObjectives(Cont.)• Session6.2– Plan,design,andcreateacustomforminDesignviewandinLayoutview

– Select,move,align,resize,delete,andrenamecontrolsinaform

– Addacomboboxtoaform– Addheadersandfooterstoaform

NewPerspectivesonMicrosoftAccess2013 3

XPXPXPObjectives(Cont.)• Session6.3– Addacomboboxtoaformtofindrecords– Addasubform toaform– Addcalculatedcontrolstoaformandasubform– Changethetaborderinaform– Improvetheappearanceofaform

NewPerspectivesonMicrosoftAccess2013 4

XPXPXPDesigningForms

• Case- ChathamCommunityHealthServicesCreatingFormsforChathamCommunityHealthServices

• UserwantstocreatenewformsforChathamCommunityHealthServicesusingmanyAccessformcustomizationfeatures,suchas:– Addingcontrolsandasubform toaform– Usingcomboboxesandcalculatedcontrols– Addingcolorandspecialeffectstoaform

NewPerspectivesonMicrosoftAccess2013 5

XPXPXPDesigningForms(Cont.)

NewPerspectivesonMicrosoftAccess2013 6

XPXPXPDesigningForms(Cont.)

NewPerspectivesonMicrosoftAccess2013 7

XPXPXPDesigningForms(Cont.)

NewPerspectivesonMicrosoftAccess2013 8

XPXPXPDesigningForms(Cont.)

NewPerspectivesonMicrosoftAccess2013 9

• ChangingaLookupFieldtoaShortTextfield– Atextboxisacontrolthatletsuserstypeanentry– Acomboboxisacontrolthatcombinesthefeaturesofatextboxandalistbox;itletsuserseitherchooseavaluefromalistortypeanentry

– Atextboxshouldbeusedwhenusersmustenterdata,whileacomboboxshouldbeusedwhenthereisafinitenumberofchoices

XPXPXPPrintingDatabaseRelationshipsandUsingtheDocumenter

NewPerspectivesonMicrosoftAccess2013 10

• TheDocumenterisusedtocreatedetaileddocumentationofall,orselected,objectsinadatabase

• Foreachselectedobject,theDocumenterletsyouprintdocumentation,suchastheobject’spropertiesandrelationships,andthenamesandpropertiesoffieldsusedbytheobject

XPXPXPPrintingDatabaseRelationshipsandUsingtheDocumenter(Cont.)

NewPerspectivesonMicrosoftAccess2013 11

XPXPXPPrintingDatabaseRelationshipsandUsingtheDocumenter(Cont.)

NewPerspectivesonMicrosoftAccess2013 12

XPXPXPPrintingDatabaseRelationshipsandUsingtheDocumenter(Cont.)

NewPerspectivesonMicrosoftAccess2013 13

XPXPXPCreatingFormsUsingFormTools

NewPerspectivesonMicrosoftAccess2013 14

CreatingaFormUsingtheDatasheetTool• TheDatasheettoolcreatesaforminadatasheetformatthat

containsallthefieldsinthesourcetableorquery

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 15

CreatingaFormUsingtheMultipleItemsTool• TheMultipleItemstoolcreatesacustomizableformthat

displaysmultiplerecordsfromasourcetableorqueryinadatasheetformat

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 16

CreatingaFormUsingtheSplitFormTool• TheSplitFormtoolcreatesacustomizableformthatdisplaysthedatainaforminbothFormviewandDatasheetviewatthesametime

• Thetwoviewsaresynchronizedwitheachotheratalltimes

• Selectingarecordinoneviewselectsthesamerecordintheotherview

• Youcanadd,change,ordeletedatafromeitherview• Typically,you’duseDatasheetviewtolocatearecord,andthenuseFormviewtoupdatetherecord

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 17

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 18

ModifyingaSplitForminLayoutView• UsetheoptionsontheDESIGNtabontheRibbontoaddcontrolsandmakeothermodificationstotheformbutnottothedatasheet

• YoucanalsomodifyformsusingoptionsontheFORMATtab

• OtherpowerfuloptionsareavailableontheARRANGEtab

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 19

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 20

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 21

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 22

AnchoringControlsinaForm• Youcandesignformsthatusethescreendimensions

effectivelywhenalltheusersofadatabasehavethesamesizedmonitorsandusethesamescreenresolution

• Ifyoudesignaformtofitonlargemonitorsusinghighscreenresolutions,thenonlyaportionofthecontrolsintheformfitonsmallermonitorswithlowerresolutions,forcinguserstoscrolltheform

• Ifyoudesignaformtofitonsmallermonitorswithlowscreenresolutions,thentheformdisplaysonlargermonitorsinasmallareaintheupper-leftcornerofthescreen,makingtheformlookunattractivelycramped

• Asacompromise,youcananchorthecontrolsintheform

XPXPXPCreatingFormsUsingFormTools(Cont.)

NewPerspectivesonMicrosoftAccess2013 23

XPXPXPPlanningandDesigningaCustomForm

NewPerspectivesonMicrosoftAccess2013 24

XPXPXPPlanningandDesigningaCustomForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 25

XPXPXPCreatingaCustomForminDesignView

NewPerspectivesonMicrosoftAccess2013 26

• CreatingformsinDesignviewallowsyoumorecontrolandprecision,andprovidesmoreoptionsthancreatingformsinLayoutview

• SwitchbetweenDesignviewandLayoutviewbecausesomedesignmodificationsareeasiertomakeinoneofthetwoviewsthanintheotherview

TheFormWindowinDesignView• UsetheFormwindowinDesignviewtocreateandmodifyforms

XPXPXPCreatingaCustomForminDesignView(Cont.)

NewPerspectivesonMicrosoftAccess2013 27

• Aboundformisaformthathasatableorqueryasitsrecordsource– Useboundformsformaintaininganddisplayingtabledata

• Unboundformsareformsthatdonothavearecordsourceandareusuallyformsthathelpusersnavigateamongtheobjectsinadatabase

XPXPXPCreatingaCustomForminDesignView(Cont.)

NewPerspectivesonMicrosoftAccess2013 28

XPXPXP

• Threekindsofcontrolsinaform:– Aboundcontrolisconnected,orbound,toafieldinthedatabase• Useboundcontrolstodisplayandmaintaintablefieldvalues

– Anunboundcontrolisnotconnectedtoafieldinthedatabase• Useunboundcontrolstodisplaytext,lines,rectangles,etc.• Anunboundcontrolthatdisplaystextiscalledalabel.

– Acalculatedcontroldisplaysavaluethatistheresultofanexpression• Theexpressionusuallycontainsoneormorefields,andthecalculatedcontrolisrecalculatedeachtimeanyvalueintheexpressionchanges

CreatingaCustomForminDesignView(Cont.)

NewPerspectivesonMicrosoftAccess2013 29

XPXPXPSelecting,Moving,andAligningControls

NewPerspectivesonMicrosoftAccess2013 30

XPXPXPSelecting,Moving,andAligningControls(Cont.)

NewPerspectivesonMicrosoftAccess2013 31

XPXPXPSelecting,Moving,andAligningControls(Cont.)

NewPerspectivesonMicrosoftAccess2013 32

XPXPXPSelecting,Moving,andAligningControls(Cont.)

NewPerspectivesonMicrosoftAccess2013 33

XPXPXPResizingandDeletingControls

NewPerspectivesonMicrosoftAccess2013 34

XPXPXPResizingandDeletingControls(Cont.)

NewPerspectivesonMicrosoftAccess2013 35

XPXPXPAddingaComboBoxtoaForm

NewPerspectivesonMicrosoftAccess2013 36

• UsetheComboBoxtoolinDesignviewtoaddacomboboxtoaform

• AControlWizardhelpsbyaskingaseriesofquestionsandthenusesyouranswerstocreateacontrolinaformorreport

• AccessoffersControlWizardsfortheComboBox,ListBox,OptionGroup,CommandButton,Subform/Subreport,andothercontroltools

XPXPXPAddingaComboBoxtoaForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 37

XPXPXPAddingaComboBoxtoaForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 38

XPXPXPAddingaComboBoxtoaForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 39

XPXPXPAddingaComboBoxtoaForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 40

XPXPXPUsingFormHeadersandFormFooters

NewPerspectivesonMicrosoftAccess2013 41

• TheFormHeaderandFormFootersectionsletyouaddtitles,instructions,commandbuttons,andothercontrolstothetopandbottomofyourform,respectively

• TheVisiblepropertydeterminesifAccessdisplaysacontrolorsection

XPXPXPAddingaTitletoaForm

NewPerspectivesonMicrosoftAccess2013 42

XPXPXPAddingaComboBoxtoFindRecords

NewPerspectivesonMicrosoftAccess2013 43

XPXPXPAddingaComboBoxtoFindRecords(Cont.)

NewPerspectivesonMicrosoftAccess2013 44

XPXPXPAddingaComboBoxtoFindRecords(Cont.)

NewPerspectivesonMicrosoftAccess2013 45

XPXPXPAddingaComboBoxtoFindRecords(Cont.)

NewPerspectivesonMicrosoftAccess2013 46

XPXPXPAddingaComboBoxtoFindRecords(Cont.)

NewPerspectivesonMicrosoftAccess2013 47

AddingaSubform toaForm• UsetheSubform/Subreport toolinDesignviewtoaddasubform toaform

XPXPXPAddingaComboBoxtoFindRecords(Cont.)

NewPerspectivesonMicrosoftAccess2013 48

XPXPXPAddingaComboBoxtoFindRecords(Cont.)

NewPerspectivesonMicrosoftAccess2013 49

XPXPXPDisplayingaSubform’s CalculatedControlsintheMainForm

NewPerspectivesonMicrosoftAccess2013 50

• TodisplaycalculatedcontrolsinaformorreportusetheCountandSumfunctions– TheCountfunctiondeterminesthenumberofoccurrencesofanexpression• =Count(expression)

– TheSumfunctioncalculatesthetotalofanexpression• =Sum(expression)

XPXPXPDisplayingaSubform’s CalculatedControlsintheMainForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 51

AddingCalculatedControlstoaSubform’s FormFooterSection

XPXPXPDisplayingaSubform’s CalculatedControlsintheMainForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 52

XPXPXPDisplayingaSubform’s CalculatedControlsintheMainForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 53

AddingCalculatedControlstoaMainForm

XPXPXPDisplayingaSubform’s CalculatedControlsintheMainForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 54

Resizing,Moving,andFormattingCalculatedControls

XPXPXPDisplayingaSubform’s CalculatedControlsintheMainForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 55

XPXPXPDisplayingaSubform’s CalculatedControlsintheMainForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 56

XPXPXPChangingtheTabOrderinaForm

NewPerspectivesonMicrosoftAccess2013 57

• PressingtheTabkeyinFormviewmovesthefocusfromonecontroltoanother– Acontrolissaidtohavefocuswhenitisactiveandawaitinguseraction

– TheorderinwhichthefocusmovesfromcontroltocontrolwhenauserpressestheTabkeyiscalledthetaborder

– Settingtabstopsenablestheusertokeephisorherhandsonthekeyboardwithoutreachingforthemouseandspeedsuptheprocessofdataentryinaform

XPXPXPChangingtheTabOrderinaForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 58

XPXPXPChangingtheTabOrderinaForm(Cont.)

NewPerspectivesonMicrosoftAccess2013 59

XPXPXPImprovingaForm’sAppearance

NewPerspectivesonMicrosoftAccess2013 60

AddingaLinetoaForm

XPXPXPImprovingaForm’sAppearance(Cont.)

NewPerspectivesonMicrosoftAccess2013 61

AddingaRectangletoaForm

XPXPXPImprovingaForm’sAppearance(Cont.)

NewPerspectivesonMicrosoftAccess2013 62

ModifyingtheVisualEffectsoftheControlsinaForm

top related