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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • morat
    New Member
    • Sep 2012
    • 1

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

    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!
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    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.

    Comment

    Working...