Formatting a currency control

T

Tony Williams

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top