validation rules and input
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Validation rules and input masks

Validation rules and input masks

The UK's most regular instructor-led training courses.
Training information: ms access courses · Access course microsoft training · Microsoft Access Training uk
See also · microsoft access training · access vba courses · access database course

resolvedResolved · High Priority · Version 2003

Validation rules and input masks

Amie has attended:
Access Introduction course
Access Intermediate course
Access Advanced course

by - delegate Amie [8 posts] (2008 Aug 1 Fri, 12:47) replyReply

Hi I want to make sure when people are entering the postcode into a field its done in the correct format
i.e SW1Y 4JU or SW6 5TD so capitals are forcibly used.
I tried inputting the expression >L which would at least force only capitals to be enetered??But this didnt work
please can you give the correct expression.

Many Thanks

Amie

Access Intermediate 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Nov 25 Tue Bloomsbury 4 book now £207 £215
2002/XP 2008 Nov 26 Wed Tooting 0 FULL    
2003 2008 Dec 2 Tue Southwark 5 book now £198 £215
2007 2008 Dec 5 Fri Bloomsbury 4 book now £224 £224
2003 2008 Dec 9 Tue Bloomsbury 0 FULL    
2002/XP 2008 Dec 11 Thu Tooting 0 FULL    
Full Schedule: See all 55 Access Intermediate course dates.
Bookings currently available until 24th November 2009.

RE: Validation rules and input masks

by - trainer Rich platinum contributer[744 posts] (2008 Aug 12 Tue, 09:05) replyReply

Hi Amie,

According to http://bytes.com/forum/thread210163.html you can use UCase() in the *AfterUpdate* event of the text box to convert the case.

In terms of displaying uppercase to the user, you can place a > in the format event of the text box (but not for memo fields).

Also: "It is also possible to use the KeyPress event to alter the KeyAscii to the upper case version of the entry. You still need the AfterUpdate event as well, in case the user pastes text in."

I hope this answers your question.

Sorry for the delay in answering, we have a lot of questions at the moment.

Also, I hope you enjoyed the Access Introduction course.

Regards, Rich

RE: Validation rules and input masks

by - delegate Amie [8 posts] (2008 Aug 12 Tue, 15:18) replyReply

Hi Rich sorry I do not understand the terms you have used."It is also possible to use the KeyPress event to alter the KeyAscii to the upper case version of the entry. You still need the AfterUpdate event as well, in case the user pastes text in."
In laymans turns where do I enter the formula?
What do I enter?Will this set the rule forcing the Postal codes to be in Caps?

Thanks

RE: Validation rules and input masks

by - trainer Rich platinum contributer[744 posts] (2008 Aug 13 Wed, 11:30) replyReply

Hi Amie,

Looking into this a bit more, my previous answer is a bit complicated, when the solution can be obtained by using an input mask.

- Go to the Design View of your table.
- Click the DataType column of the field you want to edit (ie. Postcode).
- Underneath, where the properties are (General tab), click your mouse in the InputMask field. Then click the ... button to the right of this. This brings up the InputMask Wizard.
- Select 'postal code' from the list, then 'Next'

You'll notice the InputMask will be >LL00 0LL.
The > means everything will be uppercase. The L means a mandatory alpha character and the 0 means a mandatory numeric character. I found this was a problem, because some postcodes only have 1 number (eg. SP5 8DU). So I changed the InputMask to be >LL0# 0LL, where # is an optional numeric character.

Then choose your placeholder character - what your users will be overwriting. Eg. _ will show ____ ___

Then click 'next' and choose if you want the data to be stored with the space in between, or not.

Then click Finish.

Then switch to View mode (saving the table in the process) and try entering some data. You should be forced to input the correct alpha or numeric characters, and it will appear as uppercase.

So if you just wanted all Uppercase, you would make an InputMask to be > on it's own.

Note: you may have noticed that when a user is inputting data, they can still enter lowercase letters, and when they move away from the field it changes everything to uppercase. To have the field showing uppercase when entering the data, put a > in the 'format' box just above InputMask in Design View.

I hope this helps?

Regards, Rich

Attached files...

input-mask-access.gif

RE: Validation rules and input masks

by - delegate Amie [8 posts] (2008 Aug 13 Wed, 13:32) replyReply

Perfect thanks!!!


Related articles

· Microsoft Access 2007: New Features
· Why Do I Need To Use Access?
· 3 Useful Things You'll Learn in Microsoft Access Training Courses
· Microsoft Access Training Opens Doors
· Microsoft Access: Unleash the True Potential Today

Please browse our web site to find out more about
ms access courses and other Microsoft training courses.

Access tip:

Change The Default Font in Access 2003

You can change the default font in Access 2003 so that whenever you create a new database your preferred font is automatically set.

To change the default font:

1.From the menu bar select Tools.
2.Click Options.
3.Go to the Datasheet tab:
4.In the Default font section select your preferred font from the list of fonts e.g. Arial.
5.Select your preferred size from the size menu e.g. 12.
6.Click Apply.

Click on the Tables/queries tab:
1.In the Query Design font section select your preferred font from the list of fonts e.g. Arial.
2.Select your preferred size from the size menu e.g. 12.
3.Click Apply.
4.Click OK.

The default font for Access has now been changed.

View all Access hints and tips

Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz