• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1578
  • Last Modified:

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


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
se2welch
Asked:
se2welch
  • 2
  • 2
1 Solution
 
tbsgadiCommented:
Hi se2welch,

Use an input mask "0.00"


Good Luck!

Gary
0
 
se2welchAuthor Commented:

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
 
tbsgadiCommented:
#.## as an input mask works for numbers
0
 
se2welchAuthor Commented:

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

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now