A
AHopper
I want to format a variable number before or as I store
it.
The variable is
Dim NewCartonWeight As Single
I store the number by using the following:
Set CurDb = CurrentDb
Set RegisteredUnique = CurDb.OpenRecordset
("tblRegisteredAndUniqueLabels")
With RegisteredUnique
.AddNew
!CartonWeight = NewCartonWeight
.Update
End With
RegisteredUnique.Close
Set RegisteredUnique = Nothing
(I did not include all the fields that make up the new
record)
The record stores as it should, however, I get a number
like 10.1999998092651 I want to store it with two decimal
places like 10.10.
At what point can I format the number?
How do I format the number?
Thank you in advance for your help.
Allan
it.
The variable is
Dim NewCartonWeight As Single
I store the number by using the following:
Set CurDb = CurrentDb
Set RegisteredUnique = CurDb.OpenRecordset
("tblRegisteredAndUniqueLabels")
With RegisteredUnique
.AddNew
!CartonWeight = NewCartonWeight
.Update
End With
RegisteredUnique.Close
Set RegisteredUnique = Nothing
(I did not include all the fields that make up the new
record)
The record stores as it should, however, I get a number
like 10.1999998092651 I want to store it with two decimal
places like 10.10.
At what point can I format the number?
How do I format the number?
Thank you in advance for your help.
Allan