A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formatting a currency control



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2005, 03:41 PM
Tony Williams
external usenet poster
 
Posts: n/a
Default Formatting a currency control

I have a control on a form called Total Expenses that has this formula
=IIf([Print Invoice Expenses
Subform].[Form].[RecordsetClone].[RecordCount]=0,0,[Print Invoice Expenses
Subform].[Form]![Total Expenses])

The control is a currency control with two decimal places (UK Sterling)

I have another control on the same form where the OnGotfocus Event has this
Event procedure
Private Sub expensestotal_GotFocus()
Dim expenses As Integer
expenses = Me.Total_Expenses
Me.expensestotal = expenses
Me.expensestotal.Requery
End Sub

This control is also Currency with two decimal places. The field
expensestotal in the table on which the form is based is decimal with two
decimal places.

However, if the result of the calculation on the first control is £123.67,
then the value of the second control is rounded to £124. How can I get the
true value in the second control.

I know this is unusual but I have a particular reason for this, basically I
want to store the value of the calculated control. I have two other controls
where the same thing is happening.

Can anyone help?
TIA
Tony


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having trouble with multi-select list box in Access brandelfly New Users 4 February 10th, 2005 07:36 PM
problem getting currency formatting Paul James Running & Setting Up Queries 7 July 11th, 2004 08:46 AM
Formatting a Query Field as Currency David Setting Up & Running Reports 3 July 11th, 2004 01:09 AM
How to assign value to a report control? Peter General Discussion 3 June 29th, 2004 11:17 AM


All times are GMT +1. The time now is 10:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.