From: Len on 18 Feb 2010 12:57 Why is this code not working? Me!TAXAMT = CCur(Me!TAXAMT) When I click on a button to calculate sales tax, it still shows the seven didgets. The above instruction was 6.957333 Still showed 6.9.57333 not 6.96. I thought the CCur rounded to Currency? Help wound be appreciated and Thanks in Advance Len
From: Daryl S on 18 Feb 2010 13:04 Len - Currency is set to 4 decimal places. Not sure why you have 5 after the calc. -- Daryl S "Len" wrote: > Why is this code not working? > > Me!TAXAMT = CCur(Me!TAXAMT) > > When I click on a button to calculate sales tax, it still shows the seven > didgets. > > The above instruction was 6.957333 > > Still showed 6.9.57333 not 6.96. > > I thought the CCur rounded to Currency? > > Help wound be appreciated and Thanks in Advance > > Len
From: Len on 18 Feb 2010 13:32 Thanks for getting back to me. What is the code to set it to two positions? I guess I am confused because I have worked with international monitary funds and no one in the world goes more than 3 decimals. "Daryl S" wrote: > Len - > > Currency is set to 4 decimal places. Not sure why you have 5 after the calc. > -- > Daryl S > > > "Len" wrote: > > > Why is this code not working? > > > > Me!TAXAMT = CCur(Me!TAXAMT) > > > > When I click on a button to calculate sales tax, it still shows the seven > > didgets. > > > > The above instruction was 6.957333 > > > > Still showed 6.9.57333 not 6.96. > > > > I thought the CCur rounded to Currency? > > > > Help wound be appreciated and Thanks in Advance > > > > Len
From: John Quinn on 18 Feb 2010 15:05 Len; I can see you have a very old program. If Me!TaxAmt is from the form than you must code it as follows: Dim sglTax as Single sglTax = Me!TaxAmt sglTax = Round([sglTax],2) Me!TaxAmt = sglTax CCur was changed from 2 to 4 decimals about four years ago. Microsoft went to the IBM DB II instruction. Good Luck J.Q. "Len" wrote: > Why is this code not working? > > Me!TAXAMT = CCur(Me!TAXAMT) > > When I click on a button to calculate sales tax, it still shows the seven > didgets. > > The above instruction was 6.957333 > > Still showed 6.9.57333 not 6.96. > > I thought the CCur rounded to Currency? > > Help wound be appreciated and Thanks in Advance > > Len
From: Daryl S on 19 Feb 2010 09:26 Len - You can use the Round function: Me!TAXAMT = Round(Me!TAXAMT,2) -- Daryl S "Len" wrote: > Thanks for getting back to me. > > What is the code to set it to two positions? > > I guess I am confused because I have worked with international monitary > funds and no one in the world goes more than 3 decimals. > > "Daryl S" wrote: > > > Len - > > > > Currency is set to 4 decimal places. Not sure why you have 5 after the calc. > > -- > > Daryl S > > > > > > "Len" wrote: > > > > > Why is this code not working? > > > > > > Me!TAXAMT = CCur(Me!TAXAMT) > > > > > > When I click on a button to calculate sales tax, it still shows the seven > > > didgets. > > > > > > The above instruction was 6.957333 > > > > > > Still showed 6.9.57333 not 6.96. > > > > > > I thought the CCur rounded to Currency? > > > > > > Help wound be appreciated and Thanks in Advance > > > > > > Len
|
Pages: 1 Prev: cboBox background becomes transparent Next: Footer Totals |