By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Allow user to enter both a decimal and an integer. The number is being round up in th

P: 1
I am trying to set the entry to allow the user to enter integeres or decimals (so user can enter 3 or 3.00). I am not sure why it does not work cause I change the table to be deciamls and I used the validation rule and set it to Is Null Or ((Like "*?.00") And (Not Like "*[,;C]*")). Anyway, I've been working on trying to figure it out for more than an hour now and it does not work...
Thank you so much for any help!
Sep 28 '12 #1
Share this Question
Share on Google+
1 Reply


zmbd
Expert Mod 5K+
P: 5,287
Welcome to BYTES!

There is no simple way at the table level to do this.
There are some features in V2010 that will allow the use of data-level macros; however, unless you are using a share-point site, until more understanding about these is available I'd avoid them for now.

So, IMHO, you have the following options:

Simple answer: If you need integers, then set the field to integers and do not allow the user to enter decimals.

A tad more effort: Set the field for integers and set the validation rule so that decimal entries are trapped and nice custom message pops up telling end-user to enter whole numbers only.

for a couple of bucks: Let the user enter double/long or what have you and in the query or in the report have a calculated field that converts the number to an integer.

and for the whole bankroll: Set up a form with a text box. in the before update event round the number to the nearest whole number, clear the user entry, and return the corrected value.
Sep 28 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.