Currency

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I would like to set a variable to = the currency value on my form (e.g.
£25). When I use a variable of currency, integer or string the figure is
rounded and displayed as a single whole number ommitting the pence and the £
sign.

Why is this and how do I display the full total.
 
Hi Chris,
There's more to the story than you've mentioned so far. How are you
displaying the variable?
 
If you display the variable with a MsgBox, what displays?
The variable will be displayed as a bookamrk on a word document.
Hi Chris,
There's more to the story than you've mentioned so far. How are you
[quoted text clipped - 7 lines]
 
Just the whole number.

This is for int, lng, cur and str variable types

ruralguy via AccessMonster.com said:
If you display the variable with a MsgBox, what displays?
The variable will be displayed as a bookamrk on a word document.
Hi Chris,
There's more to the story than you've mentioned so far. How are you
[quoted text clipped - 7 lines]
Why is this and how do I display the full total.
 
Both Int and Lng are integers and will truncate so that makes sense. The
variable should be Currency but Single or Double should also work. Where is
your "value on the form"? What is the data type of the field to which the
control displaying the value is bound or is it unbound?
Just the whole number.

This is for int, lng, cur and str variable types
If you display the variable with a MsgBox, what displays?
[quoted text clipped - 5 lines]
 
The value is in a textbox on a subform. The txtbox is bound to a table
where the fiels is currency and the txtbox is also currency. The Value in
the txtbox is displayed as currency.

ruralguy via AccessMonster.com said:
Both Int and Lng are integers and will truncate so that makes sense. The
variable should be Currency but Single or Double should also work. Where
is
your "value on the form"? What is the data type of the field to which the
control displaying the value is bound or is it unbound?
Just the whole number.

This is for int, lng, cur and str variable types
If you display the variable with a MsgBox, what displays?
[quoted text clipped - 5 lines]
Why is this and how do I display the full total.

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
When you Dim your variable as Currency what code do you use to set it to the
Control value?
The value is in a textbox on a subform. The txtbox is bound to a table
where the fiels is currency and the txtbox is also currency. The Value in
the txtbox is displayed as currency.
Both Int and Lng are integers and will truncate so that makes sense. The
variable should be Currency but Single or Double should also work. Where
[quoted text clipped - 11 lines]
 
Back
Top