Here is the code:
VB Code:
If ItemRec2!IM_PROD_CODE = "M" Then Dim PPS As Double Dim SC As Long If ItemRec!PS_QTY_P = 0 Then PPS = 1 Else PPS = 1 / ItemRec!PS_QTY_P End If If txtQuantity(lngVvIndex).Text < PPS Then SC = 1 Else [b]SC = CInt(((txtQuantity(lngVvIndex).Text + 2) / PPS) + 0.49)[/b] End If txtMaterial(lngVvIndex).Text = txtMaterial(lngVvIndex).Text + ((SC * ItemRec2!IM_COST) / txtQuantity(lngVvIndex).Text) End If
Can someone tell me why I'm getting an overflow error in the bolded line with the "txtQuantity(lngVvIndex).Text = 100,000"? Thanks, Jeremy
So easy I figured it out. CInt should be CLng


Reply With Quote