Maneesh A N

Maneesh A N

  • NA
  • 179
  • 107.9k

Formula error"run time error 55

May 31 2014 12:57 AM
Public Function fnAddmodifyHdr(intsave As Integer) As Boolean
On Error GoTo err
fnAddmodifyHdr = False
    Dim cmdSaves As New ADODB.Command
        cmdSaves.ActiveConnection = cnn
        cmdSaves.CommandType = adCmdStoredProc
        cmdSaves.CommandText = "sp_VazhSalesHdr"
        cmdSaves.Parameters(1) = intsave
        cmdSaves.Parameters(2) = lngVazhSalesCode
        cmdSaves.Parameters(3) = intReceiptNo
        cmdSaves.Parameters(4) = dteReceiptDate
        cmdSaves.Parameters(5) = strPersonName
        cmdSaves.Parameters(6) = intNarashatraCode
        cmdSaves.Parameters(7) = dteVazhDate
        cmdSaves.Parameters(8) = dblGrandTotal
        cmdSaves.Parameters(9) = strCancelFlag
        cmdSaves.Parameters(10) = strCancelDescript
        cmdSaves.Parameters(11) = dteCancelDate
        cmdSaves.Parameters(12) = lngDocNo
        cmdSaves.Parameters(13) = lngSlipNo
        cmdSaves.Parameters(14) = companyid
        cmdSaves.Parameters(15) = usrInfo.user_id
        cmdSaves.Execute
        If intsave = 0 Then
         lngVazhSalesCode = cmdSaves.Parameters(16).Value
         intReceiptNo = cmdSaves.Parameters(17).Value
        End If
        fnAddmodifyHdr = True
        Exit Function
        
err:
fnAddmodifyHdr = False
ErrorHandler err.Number
End Function