Top Banner
Forms: Getting Started • Why use forms? – Make applications easier to use – Prevent errors – provide different groups of users with different views of the database • There are LOTS of details in creating forms • We will just get started on it here -- use your book to learn more if you want
26

Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Forms: Getting Started

• Why use forms?– Make applications easier to use– Prevent errors– provide different groups of users with different

views of the database

• There are LOTS of details in creating forms

• We will just get started on it here -- use your book to learn more if you want

Page 2: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Two strategies for forms

• Make an autoform and adjust it– Move the controls around– Remove controls you don’t want– change colors and other properties

• Design the form from scratch– Put the controls you want, where you want– Set the properties as you want

Page 3: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Controls and Properties

• On forms, everything is called a control– Boxes, buttons, etc…

• Controls have properties that govern their appearance, behavior and their connection to the underlying data

• Properties are CRUCIAL– the more you know, the more you can do

Page 4: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Making a new form is easy

Experiment with autoforms &

the form wizard

Forms work with both

tables & queries

Page 5: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Autoforms include all the fields

Page 6: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Changes to design mode to modify the form

Page 7: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Right-button for colors, alignment, tab order and other properties

Page 8: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

To kill that annoying cloud picture, change the form’s “picture” property

Page 9: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

And choose a color...

Page 10: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Forms can have validation rules for each control (data field)

Page 11: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Moving controls can be frustrating -- stay calm!

Click & drag here to

move the LABEL

Click & drag here to

move the DATA

Page 12: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Forms and subforms

• How to display “one-to-many” data in a way that can be easily edited?– Parent form displays unique data from “one” side

– Subform displays repeating data from the “many” side

• Examples:– Each resume has many prior jobs

– Each resume has many educations credentials

• In the ActRep database, each person has many activities– Need a form for people and a sub-form for their activities

Page 13: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Strategy for subforms

• Draw the forms and subforms on paper

• Create the main form first, then the subform

• Edit the main form to include the subform

• Link them together – Use the properties of the subform control – Use the “subform field linker”

• Adjust everything until you like it

Page 14: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Make the main form based on the “people” table

This time, try working without the

wizard...

Page 15: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

A blank form, a list of field, and a toolbox for all the controls

Page 16: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Lots of controls to choose from

Hold the mouse over the icon to see what kind of control it is.

EXPERIMENT!

… pictures...

Tabs (HR/Vantage uses this a lot)

Subforms (to include related tables)

Buttons, boxes ...

Page 17: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Add the controls you want to the parent form

1. First click on the kind of control

2. Next click on the name of the field

3. Drag the fieldonto the form & move it where

you want it

Page 18: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Make the subforms (try the “tabular” autoform)

Page 19: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Needs work, but not a bad start...

Page 20: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Edit the form as necessary• Remove, re-label, and move controls

• Note the exact width (e.g., 5-1/2 inches)

Page 21: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Here’s just the subform...

Page 22: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Edit the parent to include the subform

Page 23: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Make it the right size and set its properties

Right-button on the subform area to

get at the properties

Page 24: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Data properties are critical

• Source object is the name of the subform

Page 25: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Use the Subform Field Linker• This determines which fields are linked

Read thisdescription ofthe result if

you’re not sure

Page 26: Forms: Getting Started Why use forms? –Make applications easier to use –Prevent errors –provide different groups of users with different views of the database.

Adjust things until you like it