?
Solved

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

Posted on 2009-07-15
4
Medium Priority
?
1,434 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 24859148
Hi se2welch,

Use an input mask "0.00"


Good Luck!

Gary
0
 

Author Comment

by:se2welch
ID: 24859248

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 500 total points
ID: 24859406
#.## as an input mask works for numbers
0
 

Author Comment

by:se2welch
ID: 24859448

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

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

752 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