I have formatted an some ADODB.Fields from SqlDB Feild object as follows:
Dim dblInspectionFee As Double = 0
Dim dblTaxFee As Double = 0
Dim dblTaxValue As Double = 0
Dim dblTotalFee As Double = 0
dblInspectionFee = .Fields("P01_FEE").Value
dblTaxFee = .Fields("P01_TAX").Value
dblTaxValue = .Fields("P01_TAXRATE").Val
ue
dblTotalFee = .Fields("P01_TOTAL").Value
Me.txt_InspectionFee.Text = dblInspectionFee.ToString(
"C")
Me.txt_TaxFee.Text = dblTaxFee.ToString("C")
Me.cbo_TaxValue.Text = dblTaxValue.ToString("P")
Me.txt_TotalFee.Text = dblTotalFee.ToString("C")
My Problem is that after I do some other function (Press some button) I would like to retrieve the Values from the apropriate TextBox and perform some calculation on it.
For some reason I can not change the value of the TextBox using :
Dim dblTaxValue1 As Double = 0
dblTaxValue1 = Val(Format(Me.txt_Inspecti
onFee.Text
, "#0.00"))
Back to an string Representation without the currency symbol.
dblTaxValue1 is not taking on the Me.txt_InspectionFee.Text value; it is remaining as 0 (initialized value)
Any ideas as to what I am doing wrong. This would not be an issue in VB 6. the formatting in .Net seems to be working a whole lot differently.
Start Free Trial