need some help guys, im newbie..
here the example.
A = b * c then we get value 65.5, then in my table is 66, how can i make it stay at 65? not roundup to 66?
need some help guys, im newbie..
here the example.
A = b * c then we get value 65.5, then in my table is 66, how can i make it stay at 65? not roundup to 66?
AFAIK to prevent actual rounding before storing in a table you'd have to use a query or function to coerce the value to what you want. The trick with Access tables is that often, what you see isn't what's really there. Dates would be a prime example - they are actually a form of decimal number. Right now the date and time is 44658.0091782407 .
If you don't round down with a function or query that uses one because you're actually typing in your table fields (which you should not) I believe you would have to set the field to decimal data type and set the Scale and Decimal Places properties to 0. More than likely, the table will contain 5.5 but you will only see 5, which probably would suit your purpose.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
can you give the query example sir? thank you
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
yeah already know using int but problem if it negative number, anyway thank you guys
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
"or use a query that uses one" meant uses a function. You need to say more about how you're inputting the data if you need more help. Int won't work in a calculated form field unless that field is not bound.. Int should work in a query:
UPDATE Sheet1 SET Sheet1.CountY = Int(5.5) WHERE (([ID]=3));
or in code.
see http://allenbrowne.com/round.html
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
I was thinking along the lines of"or use a query that uses one" meant uses a function. You need to say more about how you're inputting the data if you need more help. Int won't work in a calculated form field unless that field is not bound.. Int should work in a query:
UPDATE Sheet1 SET Sheet1.CountY = Int(5.5) WHERE (([ID]=3));
or in code.
see http://allenbrowne.com/round.html
Code:tt=6.5 ? iif(tt<0,INT(ABS(tt))*-1,int(tt)) -6 tt=6.5 ? iif(tt<0,INT(ABS(tt))*-1,int(tt)) 6
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Perhaps, but if this is about a form, a calculated field cannot be bound to anything so that may be an issue. That's why I saidThe OP is about as skimpy as they get. That sql seemed to work for me in a test so I expect a function would also. Until sufficient info is provided, I don't think I have anything else to add.You need to say more about how you're inputting the data if you need more help.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.