Remember Me
forgot your password?

Tips and Tricks for working with Microsoft Access Forms

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
Or use the Startup feature and specify the form here

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,
Me!Date.BackColor = 255    Me! is an Access operator
Else
Me!Date.BackColor = 16777215
End If

Or use the conditional formatting option

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

Chester Tugwell

Chester Tugwell is a freelance Microsoft Office trainer and owner of Blue Pecan Computer Training based in Sussex, UK. He provides a comprehensive set of Access training courses as well as other Microsoft Office training options.

Rate this Article: 0 / 5 stars - 0 vote(s)
Print Email Re-Publish

Add new Comment



Captcha
0
1. isaac (07:20, 01.07.2009)
how do i enter data into a table using a form

  • Latest Databases Articles
  • More from Chester Tugwell

Finding Long-Lasting Cell Phone Skins For Your Blackberry Model

By: BhratBrij | 01/01/2010
If you are going on the Internet to look for places where you can get cell phone skins , which are made-to-measure, you can get customized Blackberry Tour skins, Blackberry Pearl skins, and Blackberry Curve skins quite easily there.

Know more about compact flash 16gb

By: philipwots | 31/12/2009
It is almost a known fact that compact flash 16gb is a mass storage device format which is used in portable electronic devices in the market.

Pass4side 000-111 exam questions

By: Adela1987 | 30/12/2009
Pass4side 000-111 Exam Resources include Questions and Answers, Practice Testing Software, Stud Guides, Audio Learning and Preparation Labs. These IBM 000-111 Exam Preparation Materials will make you provide the accurate answers of real 000-111 exam questions. With our Exam Resources you can test your knowledge and readiness for exam, assess your performance in a given time, get scores and highlighted weaknesses with suggestions to improve the weak areas.

8 GB USB DRIVE

By: Phillip Roth | 29/12/2009
USB flash drive consists of a small printed circuit board carrying the circuit elements and a USB connector insulated electrically and protected inside a plastic, metal, or rubberized case which can be carried in a pocket.

Support Information About AA Online

By: Ed Philips | 26/12/2009
Discover how to quit drinking as revealed in Ed Philips "Alcoholics Anonymous Online" support guide, which offers tried and tested alcoholic addiction methods to quit drinking within 21 days.

Know the information USB sticks

By: John Milton | 24/12/2009
Now in the market there is high demand of usb sticks among its users. Seeing this the producers of usb sticks now focussing more on its reliability.

A Photography Course For All The Family

By: Dan Feildman | 23/12/2009
Excellent Digital Photography Courses Introducing Free Digital Photography Guide called "How To Take Beautiful Digital Pics Made Simple". The latest tips on how to use a digital camera like a pro.

Reinforce Database Management with Remote DBA

By: Kashif Mukhtar | 23/12/2009
Databases are the foundation of the digital economy. They store the information that run businesses and organize the vast amount of data that is created on a regular basis. Even though e-business infrastructures are requiring stronger database support to sustain their 24x7 operations, shrinking IT budgets are forcing companies to reduce the size of their DBA staff. With databases growing in size and complexity, the role of the already overburdened DBA is becoming increasingly difficult.

Creating a User Defined Function in Excel using VBA

By: Chester Tugwell | 10/07/2009 | Software
Excel includes many different functions that help you complete calculations, but have you ever wished for a function that that doesn’t exist in Excel? If you have, this tutorial will explain how to create a function DIY style.

Excel SUMIFS Function

By: Chester Tugwell | 03/07/2009 | Software
SUMIFS is a function that first appears in Excel 2007. You may have previously used SUMIF to sum up values in a list based on criteria in another column. SUMIFS works the same way but allows you to use multiple criteria either in different columns or the same column.

Excel Mortgage Payment Formula

By: Chester Tugwell | 22/06/2009 | Software
A walk through of the PMT function in Excel which allows you to calculate monthly repayments on a mortgage.

Tips and Tricks for working with Microsoft Access Reports

By: Chester Tugwell | 18/06/2009 | Databases
A selection of tips and tricks for working in Microsoft Access reports. Not all tips will be relevant to all versions of Access

Tips and Tricks for working with Microsoft Access Forms

By: Chester Tugwell | 18/06/2009 | Databases
A selection of tips for working with Microsoft Access Forms. Not all tips will be relevant to all versions of Access.

Tips and Tricks for working with Microsoft Access Queries

By: Chester Tugwell | 18/06/2009 | Databases
A collection of tips and tricks that you may find useful when working with queries in Microsoft Access.

Displaying Parameter Values in a Microsoft Access Report

By: Chester Tugwell | 18/06/2009 | Databases
If you use parameter queries and then base reports on those queries this tutorial is for you. It will show you to display the parameter values that have been used in the heading of the report.

Submit Your Articles Free: Signup
Article Categories




Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2008 Free Articles by ArticlesBase.com, All rights reserved. (0.59, 6, w2)