Systems Development Group Project Programming Access Forms.

10
Systems Development Group Project Programming Access Forms
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    214
  • download

    0

Transcript of Systems Development Group Project Programming Access Forms.

Page 1: Systems Development Group Project Programming Access Forms.

Systems Development Group Project

Programming Access Forms

Page 2: Systems Development Group Project Programming Access Forms.

Access Forms

Bound Forms

Unbound Forms

e.g. a Menu

Page 3: Systems Development Group Project Programming Access Forms.

Access Forms

Form Detail

Right click here to see form properties Some useful form

properties

Page 4: Systems Development Group Project Programming Access Forms.

Access Forms

Control Box Property to turn these on or off

Record Selectors property to turn these on or off

Min Max Property to turn these on or off

Plus various event properties – the LOAD event is especially important

Page 5: Systems Development Group Project Programming Access Forms.

Access Forms – Tool Box

Label Text Box

Command Button

List Box

Combo Box

Page 6: Systems Development Group Project Programming Access Forms.

Access Forms

Navigation buttons

Subform

Form Header

Form Footer

Text Box

Label

Page 7: Systems Development Group Project Programming Access Forms.

Access Forms

Note multiple associated records

Default View property set to ‘Continuous Forms’ NOT ‘Datasheet’

OwnerNo and PetNo have Visible property set to ‘No’

These labels are in the sub-form header

Data Entry property is set to ‘No’

Page 8: Systems Development Group Project Programming Access Forms.

Access Forms

Private Sub cmdExitPet_Click()

‘Not using Wizard‘closes this formDoCmd.Close‘opens main menu formDoCmd.OpenForm "frmVetMenu"

End Sub

Combo Box

List Box

Code in the On Click event of the Main Menu button (click on the property then on & then on ‘Code Builder’ to open up a code window.

Page 9: Systems Development Group Project Programming Access Forms.

Access Forms

Private Sub cmdMainMenu_Click()On Error GoTo Err_cmdMainMenu_Click

Dim stDocName As String Dim stLinkCriteria As String

stDocName = "frmVetMenu“

DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdMainMenu_Click: Exit Sub

Err_cmdMainMenu_Click: MsgBox Err.Description Resume Exit_cmdMainMenu_Click End Sub

This the code for the other ‘Main Menu’ button, this time generated by the Wizard.

Would need to insert DoCmd.Closeform here.

Wizards can make things easier sometimes, but can also make code unnecessarily complicated

Page 10: Systems Development Group Project Programming Access Forms.

List and Combo Boxes

Important control settings

Can build a query for the row source