Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-access > #10869 > unrolled thread
| Started by | "Phil" <phil@stantonfamily.co.uk> |
|---|---|
| First post | 2015-06-26 08:56 +0100 |
| Last post | 2015-06-28 08:53 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.databases.ms-access
Roundig problem "Phil" <phil@stantonfamily.co.uk> - 2015-06-26 08:56 +0100
Re: Roundig problem Patrick Finucane <patrickfinucanetx@gmail.com> - 2015-06-26 06:04 -0700
Re: Roundig problem "Phil" <phil@stantonfamily.co.uk> - 2015-06-27 08:58 +0100
Re: Roundig problem "Albert D. Kallal" <PleaseNOSpamkallal@msn.com> - 2015-06-27 13:52 -0600
Re: Roundig problem "Phil" <phil@stantonfamily.co.uk> - 2015-06-28 08:53 +0100
| From | "Phil" <phil@stantonfamily.co.uk> |
|---|---|
| Date | 2015-06-26 08:56 +0100 |
| Subject | Roundig problem |
| Message-ID | <mmj0jq$f9j$1@speranza.aioe.org> |
I have a field called NoBought for reasons that I can't remember it is defined a Double, althogh I only want 4 decimal places. Code is:- BoughtSoldSet!NoBought = Round(TotInt, 4) TotInt = 214.11 NoBought comes out as 214.110000610352 What's the best way of curing the problem. Incidently, I can manually or using an update query change the value to the required 214.1100 Thanks Phil --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[toc] | [next] | [standalone]
| From | Patrick Finucane <patrickfinucanetx@gmail.com> |
|---|---|
| Date | 2015-06-26 06:04 -0700 |
| Message-ID | <68428713-4b0a-4a7b-943a-fb36c06a24c3@googlegroups.com> |
| In reply to | #10869 |
On Friday, June 26, 2015 at 3:56:48 AM UTC-4, Phil wrote: > I have a field called NoBought for reasons that I can't remember it is > defined a Double, althogh I only want 4 decimal places. > > Code is:- > BoughtSoldSet!NoBought = Round(TotInt, 4) > > TotInt = 214.11 > > NoBought comes out as 214.110000610352 > What's the best way of curing the problem. > > Incidently, I can manually or using an update query change the value to the > required 214.1100 > > Thanks > > Phil > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus Change it to currency. Set the Format as Standard, decimal 4.
[toc] | [prev] | [next] | [standalone]
| From | "Phil" <phil@stantonfamily.co.uk> |
|---|---|
| Date | 2015-06-27 08:58 +0100 |
| Message-ID | <mmll2j$a3e$1@speranza.aioe.org> |
| In reply to | #10870 |
On 26/06/2015 14:04:50, Patrick Finucane wrote: > On Friday, June 26, 2015 at 3:56:48 AM UTC-4, Phil wrote: >> I have a field called NoBought for reasons that I can't remember it is >> defined a Double, althogh I only want 4 decimal places. >> >> Code is:- >> BoughtSoldSet!NoBought = Round(TotInt, 4) >> >> TotInt = 214.11 >> >> NoBought comes out as 214.110000610352 >> What's the best way of curing the problem. >> >> Incidently, I can manually or using an update query change the value to the >> required 214.1100 >> >> Thanks >> >> Phil >> >> --- >> This email has been checked for viruses by Avast antivirus software. >> https://www.avast.com/antivirus > > Change it to currency. Set the Format as Standard, decimal 4. > Thanks, Patrick. I wasn't aware that you could use Currency as anything but currency with a currency symbol and only 2 decimal places. Live and learn Phil --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[toc] | [prev] | [next] | [standalone]
| From | "Albert D. Kallal" <PleaseNOSpamkallal@msn.com> |
|---|---|
| Date | 2015-06-27 13:52 -0600 |
| Message-ID | <H9Djx.25501$eJ6.8283@fx10.iad> |
| In reply to | #10871 |
"Phil" wrote in message news:mmll2j$a3e$1@speranza.aioe.org... >Thanks, Patrick. > wasn't aware that you could use Currency as anything but currency with a >currency symbol and only 2 decimal places. > >Live and learn I explain how one can avoid rounding errors in Access here: Simple rounding errors can bite you in Access! http://www.kallal.ca/Articles/rounding/Rounding.html Regards, -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada PleaseNoSpam_kallal@msn.com
[toc] | [prev] | [next] | [standalone]
| From | "Phil" <phil@stantonfamily.co.uk> |
|---|---|
| Date | 2015-06-28 08:53 +0100 |
| Message-ID | <mmo94r$t3p$1@speranza.aioe.org> |
| In reply to | #10872 |
On 27/06/2015 20:52:04, "Albert D. Kallal" wrote: > "Phil" wrote in message news:mmll2j$a3e$1@speranza.aioe.org... > > >>Thanks, Patrick. >> wasn't aware that you could use Currency as anything but currency with a >>currency symbol and only 2 decimal places. >> >>Live and learn > > I explain how one can avoid rounding errors in Access here: > > Simple rounding errors can bite you in Access! > http://www.kallal.ca/Articles/rounding/Rounding.html > Regards, > Great article, Albert, very helpful. Unfortunately, I am so ancient that when we got our first "up-market" computer in the office, a Logabax 4200 with 8k of memory and 4Mb of disk, one had to be very careful of the size of a field. In fact, by using only capital letters and bit manipulation, we could cram 4 letters into 3 bytes. I know it is completely irrelevant now, but old habits die hard, and I wonder in you article, whether it would be helpful to add the field size for the various number types. Phil --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[toc] | [prev] | [standalone]
Back to top | Article view | comp.databases.ms-access
csiph-web