hi guys,
upon form load my datagridview is populated with data from an sql table. The datagridview has 3 columns Name, Amount and Cost. The Cost and Amount fields are have Zero as their default values. Whenever the user enters new values in those 2 fields i am using the row leave event of the datagridview to do a modulus on the amount against the cost.
The problem i am having is that the default values are being passed to the function and not the actual values entered by the user. I have enclosed my function and how i am getting the datagridview values. Any assistance would be grateful.
'below indicates how it is called
VerifyQuantity(DataGridViewRCC(1, i).Value, DataGridViewRCC(3, i).Value)
Function VerifyQuantity(ByVal a As Int64, ByVal b As Int16) As Boolean
'@@@@@@@@@@@@ Designed by: Travis Ferreira @@@@@@@@@@
'@@@@@@@@@@@@ Inputs:int64 and int16 @@@@@@@@@@
'@@@@@@@@@@@@Return:Boolean @@@@@@@@
'@@@@@@@@@@@@Purpose:Verifies that the quantities are of standard bundle sizes @@@@@@@
Dim tempval As Int64
tempval = a Mod b
If tempval > 0 Then
Return False
Else
Return True
End If
End Function