Hi,
In my VB application ,I have used a flex grid in which I had cols named Discount and Charges now I want to give a validation that if the person enters the Discount it should be less then Charges,for that I compared the data of Discount col with Zero to check wether the user had entered the Discount or not if Yes then I compared Discount with Charges .
I have defined the ColDatatype property of both the col as FlexDTDouble.
**************C ODE************ *************** **
If vsfgInvestigati ons.TextMatrix( 1, Discount) <> 0 Then
If vsfgInvestigati ons.TextMatrix( 1, Discount) > vsfgInvestigati ons.TextMatrix( 1, Charges) Then
MsgBox "Discount should be less then charges", vbInformation, Me.Caption
Exit Function
End If
End If
*************** ***CODE******** *************** *******
Now the problem arises when I compare Discount Col with Zero it gives the Error as Datatype Mismatch.
So which Datatype should I use.
In my VB application ,I have used a flex grid in which I had cols named Discount and Charges now I want to give a validation that if the person enters the Discount it should be less then Charges,for that I compared the data of Discount col with Zero to check wether the user had entered the Discount or not if Yes then I compared Discount with Charges .
I have defined the ColDatatype property of both the col as FlexDTDouble.
**************C ODE************ *************** **
If vsfgInvestigati ons.TextMatrix( 1, Discount) <> 0 Then
If vsfgInvestigati ons.TextMatrix( 1, Discount) > vsfgInvestigati ons.TextMatrix( 1, Charges) Then
MsgBox "Discount should be less then charges", vbInformation, Me.Caption
Exit Function
End If
End If
*************** ***CODE******** *************** *******
Now the problem arises when I compare Discount Col with Zero it gives the Error as Datatype Mismatch.
So which Datatype should I use.
Comment