ALT
Shortcut to a Control
Place a & before the
letter you want to act
as the ALT shortcut
Use && to display
a literal &.
Making Small
Adjustments to the Size
and Position of Controls
CTRL arrow keys –
position
SHIFT arrow keys - size
Showing the Current
Date and Time
In design view –
Insert | Date and Time
Using Images
You can cut and paste
from image software –
use the selection tool
in the image software
to copy over a portion
of the image.When you
resize the Unbound Object
Frame the picture by default
will crop. Change the
Size Mode property to
Stretch or Zoom. Stretch
will change the proportions
of the image to exactly
fit the frame, Zoom will
change the size but not
the proportions.
Double- click on the
image to edit it.
Convert the unbound object
frame to an image control
(bitmap) to save disk
space and have the form
open more quickly:Right
click on the image Change
To | Image. The image
cannot be edited once
it is converted.
To have an image in the
form background:
In design view, go to
the properties for the
form:
Format tab | Picture (Build
button) – select
the picture you want
In the Picture Type property
choose Embedded or linked
Set the Picture Size Mode
property as desired.
Prevent Data
Entry
Properties: [Data] –
set Allow Deletions and
Allow Edits to No.
Change the Grid
Spacing in Design View
Form Properties [Format]
Grid X, Y
Specify a Control
to Focus On When the New
Record Button is Used
Create the New Record
button and open the Properties
Event tab
Click on the build button,
and after, ‘DoCmd.GoToRecord
, , acNewRec’
TypeForms![FormName]![ControlName].SetFocus
Close and Return to the
Access and save the form.
Disable the Ability
to Switch Between Form
Views
Properties [Format] Select
No for views not allowed
Change default view to
one of the views allowed.
Prevent Editing
at the Control Level
Properties [Data]
– to prevent editing
set the Locked property
to Yes
- to dim the control so
that it can’t be
selected set the Enabled
property to No.
Shortcut key
to Move between Header
and Detail Sections
F6
Have a Form Open
Automatically when the
Database is Opened
Create a new macro.
Under Actions choose OpenForm
In the Actions pane, under
Form Name select the Form
you want to open
Save macro as Autoexec
Or save a shortcut to
the form on the desktop
Print the Current
Record Button
Record Operations | Print
Record
Disable the rest
of the Database whilst
in a Form
Properties [Other] Modal
set to Yes
Change the Tab
Order of Elements
View | Tab Order
Change the Title
in the Title Bar
Properties [Format] Caption
property
Add a Calculated
Field
Add a text box and add
the calculation based
on fields etc eg =[Cost]
+ [Shipping]
Show a Blank
Record Only
Properties [Data] Data
Entry property set to
Yes
To see all Records Records
| Remove Filter/Sort
Keeping Controls
Aligned
Hold down shift whilst
moving a control –
you will only be able
to move vertically or
horizontally, not in both
directions.
Have a form change
Colour as different Fields
are in Focus
Control property [Event]
On Enter property -
Forms![FormName].Section(0).BackColor
=nnnnn
Same code for On Exit
property to change the
colour when exiting the
control.
Set Defaults
for Tools
View | Properties and
then click the tool on
the toolbox
For text boxes without
labs change Auto Label
property to No
Create Straight
Lines
Hold down shift
Conditional Formatting
on Text Boxes
On Exit Property add the
following:
If Date < Now() Then
Date is the field name,
<Now() is the criteria
Me!Date.BackColor = 255
Me! is an Access operator
Else
Me!Date.BackColor = 16777215
End If
Prevent an Object
from Printing
Object Properties [Format]
– Display When property
– Screen Only
Add a Screen
Tip to a Control
Control Properties [Other]
– ControlTip Text
Have a Form Close
Automatically after a
Period of Time (Splash
Screen)
Create a Macro –
Action = Close
Save the Macro
Form properties [Event]
– Timer Interval
property (1 sec = 1000),
On Timer property –
select the macro.
What’s the
Difference Between a Bound
and an Unbound Object
Frame
A bound object is linked
to a field in a table
and therefore changes
with each record. An unbound
object is an object that
appears in each record
Export A Form
and a Sub Form to Excel
The only way to do this
is to create a query that
includes the two sets
of data (linked) and export
this.
Validation –
Forms vs Tables
If a different validation
rule is applied to a control,
than the rule applied
to that field in the underlying
table, both validation
rules are taken into consideration.
Showing all records
in a Subform when Printed
In subform, Properties
for detail section [Format]
Can grow property –
set to Yes
Open Up a Separate
Form to Show Related Records
Create a command button
under Form Operations
– choose Open Form
Select “Open form
and find specific data
to display”
Select the fields that
link that tables on both
sides and link them using
the <-> button.
Show SubForm
Calculations in the Main
Form
Can’t do this directly,
so need to create control
that makes the calculation
in the subform (usually
in the footer) in properties
do two things:
Control Name –
give the control a name
Visible property –
set to ‘No’
Add a text box to the
main form with the following
syntax:
=[subform name].Form![calculation
control name]
AutoTab between Controls
with a Set Number of Characters
Set Input Mask property
to the number of characters
allowed
Set the AutoTab property
to yes.
Prevent Tabbing
Into a Control
Properties [Other] Tab
Stop property to No
|