Hey,
This problem has me baffled. In a textbox, which is bound I display a price per share. I have set the format to currency, and everything displays fine. But in code I am trying to copy the value exactly as it is displayed in the textbox. Now I have tried the following methods.
The value displayed in the textbox (for example)is £0.40, but all the code tests I have done, read the value from the text box as "0.4" without the leading pound sign and last 0. "I need this displayed as is , because I am using it in in a word document"
What Ive tried...
Test 1
Dim CurPricePerShare as Currency
CurPricePerShare = Me.TxtPricePerShare
Test 2
Dim CurPricePerShare as Currency
CurPricePerShare = Format$(Me.PricePerShare, "£###.##"
Test 3
Dim CurPricePerShare as Currency
CurPricePerShare = CCur(CurPricePerShare)
Test 4
Dim StrCurPricePerShare as String
StrCurPricePerShare = Me.TxtPricePerShare
Test 5
Dim CurPricePerShare as Currency
CurPricePerShare = Me.TxtPricePerShare.Value
I've tried all of these and more, If any one has any ideas please let me know, I'm going crazzy! I'm losing my mind!
Cheers
Sam
"You couldn't fool your mother on the foolingest day of your life if you had an electrified fooling machine." - Homer
This problem has me baffled. In a textbox, which is bound I display a price per share. I have set the format to currency, and everything displays fine. But in code I am trying to copy the value exactly as it is displayed in the textbox. Now I have tried the following methods.
The value displayed in the textbox (for example)is £0.40, but all the code tests I have done, read the value from the text box as "0.4" without the leading pound sign and last 0. "I need this displayed as is , because I am using it in in a word document"
What Ive tried...
Test 1
Dim CurPricePerShare as Currency
CurPricePerShare = Me.TxtPricePerShare
Test 2
Dim CurPricePerShare as Currency
CurPricePerShare = Format$(Me.PricePerShare, "£###.##"
Test 3
Dim CurPricePerShare as Currency
CurPricePerShare = CCur(CurPricePerShare)
Test 4
Dim StrCurPricePerShare as String
StrCurPricePerShare = Me.TxtPricePerShare
Test 5
Dim CurPricePerShare as Currency
CurPricePerShare = Me.TxtPricePerShare.Value
I've tried all of these and more, If any one has any ideas please let me know, I'm going crazzy! I'm losing my mind!
Cheers
Sam
"You couldn't fool your mother on the foolingest day of your life if you had an electrified fooling machine." - Homer