Solved

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

Posted on 2009-07-15
4
1,353 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
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 125 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA to copy the database back end to a new database file. 3 36
deduplicating based on criteria 2 21
Dlookup MSACCESS 5 25
backup programme - VBA 3 24
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

803 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