Solved

Validation rule needed to force 2 decimal place entry in Access 2003

Posted on 2009-07-15
4
1,309 Views
Last Modified: 2013-11-28

Hi.

I'm trying to get a field in Access to only accept entry of 2 decimal places (eg 1.85) and to reject a user attempt to enter 1.851 or 1.8.

I've tried using setting the field to be a number and using a validation rule (Like "#.##"), and this works to a certain extent, but also rejects numbers with a trailing zero such as 1.80.

Changing the field to be a text field and using the ("Like "#.##") validation works, but it forces the user to enter any leading zeros (eg. 0.80) which isn't ideal.

Any ideas?
 
0
Comment
Question by:se2welch
  • 2
  • 2
4 Comments
 
LVL 46

Expert Comment

by:tbsgadi
Comment Utility
Hi se2welch,

Use an input mask "0.00"


Good Luck!

Gary
0
 

Author Comment

by:se2welch
Comment Utility

Hi Gary,

Thanks for the post, however an input mask will only work when the field is a text field and requires the same leading zero as my solution of changing the field to be a text field and using the ("Like "#.##") validation.  I was hoping there might be a way to do it and leave it as a number field.
0
 
LVL 46

Accepted Solution

by:
tbsgadi earned 125 total points
Comment Utility
#.## as an input mask works for numbers
0
 

Author Comment

by:se2welch
Comment Utility

Ahh.  It's just the imput mask wizard that only works for text and date!  Thanks so much!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now