473,513 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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
1 1733
zmbd
5,501 Recognized Expert Moderator Expert
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

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

Similar topics

6
35651
by: fctk | last post by:
hello, i'm trying to compile this small program: int main(void) { unsigned long int max; max = 4000000000;
3
1342
by: biltz | last post by:
i made a programe in which by using scanf..the user enter the password...but is there any function..or something else..so which , what ever enter the user its changeinto "*" not its shows what he...
2
4483
by: Tukeind | last post by:
Hello, I am receiving the following error: error C2065: 'to_binary' : undeclared identifier while running the code below. If anyone can help I'll appreciate it? Thank you, Tukeind
1
1461
by: rebellion | last post by:
write a c++ program that will continuously accept a number. the loop will stop if the user enter a number which is less of equal than the previous. ex. if i input 2 then my next input is 4 ...
2
4461
by: star01daisy | last post by:
This is what the assignment says to do: Write a C++ program to do decimal-binary number conversions. The program gives the user a choice of conversion type (binary to decimal or decimal to binary)....
1
1394
by: Naisargi | last post by:
A c++ prog to enter an integer & print its total value based on followin formula x-1/3!*3+1/5!*5-1/7!*7+1/9!*9
7
4200
by: Udara chathuranga | last post by:
How can I convert binary float number into a decimal float number ?
6
3519
by: ikbel borcheni | last post by:
How to convert an hexadecimal integer to decimal integer? Is there a function to do that in VC++?
0
7264
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7386
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7543
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3236
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
459
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.