Title: Creating a Form Using AutoForm
1Creating a Form Using AutoForm
open database file
Insert, AutoForm
OR
click triangle beside New Objects button
click
select table
2Creating a Form Using AutoForm/2
allows you to focus on a single record at a time
use navigation buttons to display other
records or add a new record
3Sorting Records
click desired sort button
click in the field on which you want to sort
4Printing a Form
File, Print
click to print selected record
Select File, Page Setup to change margins and/or
orientation.
5Adding Records
click New Record button
OR
6Deleting Records
click Delete Record button
click Yes to confirm delete
7Using the Form Wizard
open database file
OR
Insert, Form
click
click Forms button on the Objects bar
8Using the Form Wizard/2
double-click
9Using the Form Wizard/3
select table
select fields
click
10Using the Form Wizard/4
select layout
click
11Using the Form Wizard/5
select style
click
12Using the Form Wizard/6
type a name
click
13Related Database Tables
after selecting fields from first table select
another table from drop-down list
14Creating a Form in Design View
open database file
OR
Insert, Form, DesignView
click Forms button on the Objects bar
15Creating a Form in Design View/2
Form Selector Button
Design Grid
Toolbox
16Displaying Form Properties
OR
Properties button
View, Properties (Alt Enter)
17Using Fields to Add Controls
drag the desired fields to the Design grid
select a table
18Moving Control Objects
to move both controls point to border of control
(not at handle) drag when pointer becomes a hand
to move individual controls point to large black
handle and drag
hold down Shift key to select and move multiple
control objects at the same time
19Resizing Control Objects
middle sizing handles at the left or right wider
or narrower
middle sizing handles at the top or bottom taller
or shorter
corner sizing handles resize both horizontally
and vertically
20Formatting Control Objects
select control object(s)
notice title changes
click in desired text box
Click three dots (or in some text boxes, an
arrow) to view additional formatting choices.
21Aligning Control Objects
select control objects
22Adding Controls Using the Toolbox
Automatically appears when form is displayed in
Design view. If the Toolbox does not display,
follow a method shown below.
Toolbox button
OR
View, Toolbox
23Toolbox Buttons
Text Box
Label
24Adding a Form Header and Form Footer
View, Form Header/Footer
increase the height by dragging the border line
use Label button to draw label type text and
apply desired formatting
25Adding a Calculated Control
Draw a text box control object and enter a
mathematical equation.
insert square brackets around field names
26Lets create a Form that will look like this ?
Label
Image
Text Box
Combo Box
Caption
Record Navigation Buttons
27Step 1 Add a new form to the database
28Step 2 Open the form in Design View and Select
the table
- the fields of the table you select will be
bound to the text boxes
on the form
29Step 3 The form in Design View
Header (titles)
Details (records)
Footer (navigation buttons)
- if you do not see the Header / Footer select
View Form Header/Footer
30Step 4a Useful Icon ?
- Field List lists the fields from the underlying
Customer table - you will select and drag fields onto the Detail
area of the form
31Step 4b Another Useful Icon ?
- Toolbox lists additional objects which can
placed on the form - similar to VB !
32Step 5 Add a field to the form
- notice how the (very tacky) Caption was
inherited from from the table
33Step 6 One more Useful Icon ?
- lists the available Properties for the selected
object (CustNo)
34Step 7 The Property of a Form!
- the Form is bound to the underlying Table
- the Textbox is bound to the underlying Field
- you can set the ability to Add, Edit and Delete
records in the table
- Access hid this little dickens really well ?
35Step 8 Add a title to your Form
- by putting a Label (and an Image) on every Form
Header in your system, you can get a common look
common design standards!
36Step 9 View the finished product!
the Record Selector, Scroll Bar and all those
lines make the Form very busy
- the Record Navigation Bar was added automatically
37Step 10 Cleanup!
- you must now add your own Record Navigation
Buttons
38Step 11a Add a button - Wizard
- you must have the Wizard button selected to
generate the code for the button
39Step 11b Add button - Select action
- note the many button actions you can choose from
40Step 11c Add button - Select style
- a picture is worth a 1000 words!
41Step 11d Add button Name the Object
- consistent, standardized naming conventions are
very important !
42Step 11e Add a button the Code!
Private Sub cmdNext_Click() DoCmd.GoToRecord
, , acNext End Sub
43Completed