Private mvarDtCash As Double

Private mvarDtCashBnk As string


Private mvarDtCess As Double

Private mvarDtChqNo As string


Private mvarDtClAcCd As string


Private mvarDtClientCity As string


Private mvarDtClientCode As Long

Private mvarDtClientName As string


Private mvarDtComAmt As Double

Private mvarDtComPer As Double

Private mvarDtCrDays As Long

Private mvarDtCredit As Double

Private mvarDtCtNs As Long

Private mvarDtDate As Date

Private mvarDtDisc As Double

Private mvarDtDiscper As Double

Private mvarDtDrCd As string


Private mvarDtDrHead As string


Private mvarDtEmp1 As string


Private mvarDtEmp1AcCd As string


Private mvarDtEmp1Cd As Long

Private mvarDtEmp1Wages As Double

Private mvarDtEmp2 As string


Private mvarDtEmp2AcCd As string


Private mvarDtEmp2Cd As Long

Private mvarDtEmp2Wages As Double

Private mvarDtExp As Double

Private mvarDtExtra As Double

Private mvarDtFrightAmt As Double

Private mvarDtFrightChar As Double


Private mvarDtGross As Double

Private mvarDtGross0 As Double

Private mvarDtGross1 As Double

Private mvarDtGross12 As Double

Private mvarDtGross4 As Double

Private mvarDtHostName As string


Private mvarDtInvNo As string


Private mvarDtIPT1 As Double

Private mvarDtIPT12 As Double

Private mvarDtIPT4 As Double

Private mvarDtLrNo As string


Private mvarDtNetAmt As Double

Private mvarDtOth As Double

Private mvarDtOthAdd As Double


Private mvarDtRefNo As Long

Private mvarDtSite As Long

Private mvarDtTax As Double

Private mvarDtTaxAmt As Double

Private mvarDtTotal As Double

Private mvarDtVehNo As string


Public Property Let DtCash(ByVal vData As Double)
         mvarDtCash= vData
End Property

Public Property Get DtCash() As Double
        DtCash= mvarDtCash
End Property

Public Property Let DtCashBnk(ByVal vData As String)
         mvarDtCashBnk= vData
End Property

Public Property Get DtCashBnk() As String
        DtCashBnk= mvarDtCashBnk
End Property

Public Property Let DtCess(ByVal vData As Double)
         mvarDtCess= vData
End Property

Public Property Get DtCess() As Double
        DtCess= mvarDtCess
End Property

Public Property Let DtChqNo(ByVal vData As String)
         mvarDtChqNo= vData
End Property

Public Property Get DtChqNo() As String
        DtChqNo= mvarDtChqNo
End Property

Public Property Let DtClAcCd(ByVal vData As String)
         mvarDtClAcCd= vData
End Property

Public Property Get DtClAcCd() As String
        DtClAcCd= mvarDtClAcCd
End Property

Public Property Let DtClientCity(ByVal vData As String)
         mvarDtClientCity= vData
End Property

Public Property Get DtClientCity() As String
        DtClientCity= mvarDtClientCity
End Property

Public Property Let DtClientCode(ByVal vData As long)
         mvarDtClientCode= vData
End Property

Public Property Get DtClientCode() As long
        DtClientCode= mvarDtClientCode
End Property

Public Property Let DtClientName(ByVal vData As String)
         mvarDtClientName= vData
End Property

Public Property Get DtClientName() As String
        DtClientName= mvarDtClientName
End Property

Public Property Let DtComAmt(ByVal vData As Double)
         mvarDtComAmt= vData
End Property

Public Property Get DtComAmt() As Double
        DtComAmt= mvarDtComAmt
End Property

Public Property Let DtComPer(ByVal vData As Double)
         mvarDtComPer= vData
End Property

Public Property Get DtComPer() As Double
        DtComPer= mvarDtComPer
End Property

Public Property Let DtCrDays(ByVal vData As long)
         mvarDtCrDays= vData
End Property

Public Property Get DtCrDays() As long
        DtCrDays= mvarDtCrDays
End Property

Public Property Let DtCredit(ByVal vData As Double)
         mvarDtCredit= vData
End Property

Public Property Get DtCredit() As Double
        DtCredit= mvarDtCredit
End Property

Public Property Let DtCtNs(ByVal vData As long)
         mvarDtCtNs= vData
End Property

Public Property Get DtCtNs() As long
        DtCtNs= mvarDtCtNs
End Property

Public Property Let DtDate(ByVal vData As Date)
         mvarDtDate= vData
End Property

Public Property Get DtDate() As Date
        DtDate= mvarDtDate
End Property

Public Property Let DtDisc(ByVal vData As Double)
         mvarDtDisc= vData
End Property

Public Property Get DtDisc() As Double
        DtDisc= mvarDtDisc
End Property

Public Property Let DtDiscper(ByVal vData As Double)
         mvarDtDiscper= vData
End Property

Public Property Get DtDiscper() As Double
        DtDiscper= mvarDtDiscper
End Property

Public Property Let DtDrCd(ByVal vData As String)
         mvarDtDrCd= vData
End Property

Public Property Get DtDrCd() As String
        DtDrCd= mvarDtDrCd
End Property

Public Property Let DtDrHead(ByVal vData As String)
         mvarDtDrHead= vData
End Property

Public Property Get DtDrHead() As String
        DtDrHead= mvarDtDrHead
End Property

Public Property Let DtEmp1(ByVal vData As String)
         mvarDtEmp1= vData
End Property

Public Property Get DtEmp1() As String
        DtEmp1= mvarDtEmp1
End Property

Public Property Let DtEmp1AcCd(ByVal vData As String)
         mvarDtEmp1AcCd= vData
End Property

Public Property Get DtEmp1AcCd() As String
        DtEmp1AcCd= mvarDtEmp1AcCd
End Property

Public Property Let DtEmp1Cd(ByVal vData As long)
         mvarDtEmp1Cd= vData
End Property

Public Property Get DtEmp1Cd() As long
        DtEmp1Cd= mvarDtEmp1Cd
End Property

Public Property Let DtEmp1Wages(ByVal vData As Double)
         mvarDtEmp1Wages= vData
End Property

Public Property Get DtEmp1Wages() As Double
        DtEmp1Wages= mvarDtEmp1Wages
End Property

Public Property Let DtEmp2(ByVal vData As String)
         mvarDtEmp2= vData
End Property

Public Property Get DtEmp2() As String
        DtEmp2= mvarDtEmp2
End Property

Public Property Let DtEmp2AcCd(ByVal vData As String)
         mvarDtEmp2AcCd= vData
End Property

Public Property Get DtEmp2AcCd() As String
        DtEmp2AcCd= mvarDtEmp2AcCd
End Property

Public Property Let DtEmp2Cd(ByVal vData As long)
         mvarDtEmp2Cd= vData
End Property

Public Property Get DtEmp2Cd() As long
        DtEmp2Cd= mvarDtEmp2Cd
End Property

Public Property Let DtEmp2Wages(ByVal vData As Double)
         mvarDtEmp2Wages= vData
End Property

Public Property Get DtEmp2Wages() As Double
        DtEmp2Wages= mvarDtEmp2Wages
End Property

Public Property Let DtExp(ByVal vData As Double)
         mvarDtExp= vData
End Property

Public Property Get DtExp() As Double
        DtExp= mvarDtExp
End Property

Public Property Let DtExtra(ByVal vData As Double)
         mvarDtExtra= vData
End Property

Public Property Get DtExtra() As Double
        DtExtra= mvarDtExtra
End Property

Public Property Let DtFrightAmt(ByVal vData As Double)
         mvarDtFrightAmt= vData
End Property

Public Property Get DtFrightAmt() As Double
        DtFrightAmt= mvarDtFrightAmt
End Property

Public Property Let DtFrightChar(ByVal vData As Double)
         mvarDtFrightChar= vData
End Property

Public Property Get DtFrightChar() As Double
        DtFrightChar= mvarDtFrightChar
End Property

Public Property Let DtGross(ByVal vData As Double)
         mvarDtGross= vData
End Property

Public Property Get DtGross() As Double
        DtGross= mvarDtGross
End Property

Public Property Let DtGross0(ByVal vData As Double)
         mvarDtGross0= vData
End Property

Public Property Get DtGross0() As Double
        DtGross0= mvarDtGross0
End Property

Public Property Let DtGross1(ByVal vData As Double)
         mvarDtGross1= vData
End Property

Public Property Get DtGross1() As Double
        DtGross1= mvarDtGross1
End Property

Public Property Let DtGross12(ByVal vData As Double)
         mvarDtGross12= vData
End Property

Public Property Get DtGross12() As Double
        DtGross12= mvarDtGross12
End Property

Public Property Let DtGross4(ByVal vData As Double)
         mvarDtGross4= vData
End Property

Public Property Get DtGross4() As Double
        DtGross4= mvarDtGross4
End Property

Public Property Let DtHostName(ByVal vData As String)
         mvarDtHostName= vData
End Property

Public Property Get DtHostName() As String
        DtHostName= mvarDtHostName
End Property

Public Property Let DtInvNo(ByVal vData As String)
         mvarDtInvNo= vData
End Property

Public Property Get DtInvNo() As String
        DtInvNo= mvarDtInvNo
End Property

Public Property Let DtIPT1(ByVal vData As Double)
         mvarDtIPT1= vData
End Property

Public Property Get DtIPT1() As Double
        DtIPT1= mvarDtIPT1
End Property

Public Property Let DtIPT12(ByVal vData As Double)
         mvarDtIPT12= vData
End Property

Public Property Get DtIPT12() As Double
        DtIPT12= mvarDtIPT12
End Property

Public Property Let DtIPT4(ByVal vData As Double)
         mvarDtIPT4= vData
End Property

Public Property Get DtIPT4() As Double
        DtIPT4= mvarDtIPT4
End Property

Public Property Let DtLrNo(ByVal vData As String)
         mvarDtLrNo= vData
End Property

Public Property Get DtLrNo() As String
        DtLrNo= mvarDtLrNo
End Property

Public Property Let DtNetAmt(ByVal vData As Double)
         mvarDtNetAmt= vData
End Property

Public Property Get DtNetAmt() As Double
        DtNetAmt= mvarDtNetAmt
End Property

Public Property Let DtOth(ByVal vData As Double)
         mvarDtOth= vData
End Property

Public Property Get DtOth() As Double
        DtOth= mvarDtOth
End Property

Public Property Let DtOthAdd(ByVal vData As Double)
         mvarDtOthAdd= vData
End Property

Public Property Get DtOthAdd() As Double
        DtOthAdd= mvarDtOthAdd
End Property

Public Property Let DtRefNo(ByVal vData As long)
         mvarDtRefNo= vData
End Property

Public Property Get DtRefNo() As long
        DtRefNo= mvarDtRefNo
End Property

Public Property Let DtSite(ByVal vData As long)
         mvarDtSite= vData
End Property

Public Property Get DtSite() As long
        DtSite= mvarDtSite
End Property

Public Property Let DtTax(ByVal vData As Double)
         mvarDtTax= vData
End Property

Public Property Get DtTax() As Double
        DtTax= mvarDtTax
End Property

Public Property Let DtTaxAmt(ByVal vData As Double)
         mvarDtTaxAmt= vData
End Property

Public Property Get DtTaxAmt() As Double
        DtTaxAmt= mvarDtTaxAmt
End Property

Public Property Let DtTotal(ByVal vData As Double)
         mvarDtTotal= vData
End Property

Public Property Get DtTotal() As Double
        DtTotal= mvarDtTotal
End Property

Public Property Let DtVehNo(ByVal vData As String)
         mvarDtVehNo= vData
End Property

Public Property Get DtVehNo() As String
        DtVehNo= mvarDtVehNo
End Property



Function GetDmg_Trn ( )
Dim S1 as string
Dim R1 as New Adodb.recordset
S1="Select * from Dmg_Trn Where Dt=" & Dt
R1.open S1,con,adopendynamic,adlockoptimistic
    if not R1.eof then
     DtCash=R1!Dt_Cash
     DtCashBnk=R1!Dt_CashBnk
     DtCess=R1!Dt_Cess
     DtChqNo=R1!Dt_ChqNo
     DtClAcCd=R1!Dt_ClAcCd
     DtClientCity=R1!Dt_ClientCity
     DtClientCode=R1!Dt_ClientCode
     DtClientName=R1!Dt_ClientName
     DtComAmt=R1!Dt_ComAmt
     DtComPer=R1!Dt_ComPer
     DtCrDays=R1!Dt_CrDays
     DtCredit=R1!Dt_Credit
     DtCtNs=R1!Dt_CtNs
     DtDate=R1!Dt_Date
     DtDisc=R1!Dt_Disc
     DtDiscper=R1!Dt_Discper
     DtDrCd=R1!Dt_DrCd
     DtDrHead=R1!Dt_DrHead
     DtEmp1=R1!Dt_Emp1
     DtEmp1AcCd=R1!Dt_Emp1AcCd
     DtEmp1Cd=R1!Dt_Emp1Cd
     DtEmp1Wages=R1!Dt_Emp1Wages
     DtEmp2=R1!Dt_Emp2
     DtEmp2AcCd=R1!Dt_Emp2AcCd
     DtEmp2Cd=R1!Dt_Emp2Cd
     DtEmp2Wages=R1!Dt_Emp2Wages
     DtExp=R1!Dt_Exp
     DtExtra=R1!Dt_Extra
     DtFrightAmt=R1!Dt_FrightAmt
     DtFrightChar=R1!Dt_FrightChar
     DtGross=R1!Dt_Gross
     DtGross0=R1!Dt_Gross0
     DtGross1=R1!Dt_Gross1
     DtGross12=R1!Dt_Gross12
     DtGross4=R1!Dt_Gross4
     DtHostName=R1!Dt_HostName
     DtInvNo=R1!Dt_InvNo
     DtIPT1=R1!Dt_IPT1
     DtIPT12=R1!Dt_IPT12
     DtIPT4=R1!Dt_IPT4
     DtLrNo=R1!Dt_LrNo
     DtNetAmt=R1!Dt_NetAmt
     DtOth=R1!Dt_Oth
     DtOthAdd=R1!Dt_OthAdd
     DtRefNo=R1!Dt_RefNo
     DtSite=R1!Dt_Site
     DtTax=R1!Dt_Tax
     DtTaxAmt=R1!Dt_TaxAmt
     DtTotal=R1!Dt_Total
     DtVehNo=R1!Dt_VehNo

    End if
R1.close
End function




Function SaveDmg_Trn (AddNew as Boolean)
Dim S1 as string
Dim R1 as New Adodb.recordset
    If Addnew=true then
         S1="Select Max(Dt) from Dmg_Trn"
         R1.open S1,con,adopendynamic,adlockoptimistic
              If  Not R1.eof then
                   Dt=val(retfield(R1.fields(0)))+1
              End If
         R1.close
         S1="Select * from Dmg_Trn"
    Else
         S1="Select * from Dmg_Trn Where Dt=" & Dt
    End If
R1.open S1,con,adopendynamic,adlockoptimistic
   If Addnew=true then
      R1.addnew
   End If
     R1!Dt_Cash = DtCash
     R1!Dt_CashBnk = DtCashBnk
     R1!Dt_Cess = DtCess
     R1!Dt_ChqNo = DtChqNo
     R1!Dt_ClAcCd = DtClAcCd
     R1!Dt_ClientCity = DtClientCity
     R1!Dt_ClientCode = DtClientCode
     R1!Dt_ClientName = DtClientName
     R1!Dt_ComAmt = DtComAmt
     R1!Dt_ComPer = DtComPer
     R1!Dt_CrDays = DtCrDays
     R1!Dt_Credit = DtCredit
     R1!Dt_CtNs = DtCtNs
     R1!Dt_Date = DtDate
     R1!Dt_Disc = DtDisc
     R1!Dt_Discper = DtDiscper
     R1!Dt_DrCd = DtDrCd
     R1!Dt_DrHead = DtDrHead
     R1!Dt_Emp1 = DtEmp1
     R1!Dt_Emp1AcCd = DtEmp1AcCd
     R1!Dt_Emp1Cd = DtEmp1Cd
     R1!Dt_Emp1Wages = DtEmp1Wages
     R1!Dt_Emp2 = DtEmp2
     R1!Dt_Emp2AcCd = DtEmp2AcCd
     R1!Dt_Emp2Cd = DtEmp2Cd
     R1!Dt_Emp2Wages = DtEmp2Wages
     R1!Dt_Exp = DtExp
     R1!Dt_Extra = DtExtra
     R1!Dt_FrightAmt = DtFrightAmt
     R1!Dt_FrightChar = DtFrightChar
     R1!Dt_Gross = DtGross
     R1!Dt_Gross0 = DtGross0
     R1!Dt_Gross1 = DtGross1
     R1!Dt_Gross12 = DtGross12
     R1!Dt_Gross4 = DtGross4
     R1!Dt_HostName = DtHostName
     R1!Dt_InvNo = DtInvNo
     R1!Dt_IPT1 = DtIPT1
     R1!Dt_IPT12 = DtIPT12
     R1!Dt_IPT4 = DtIPT4
     R1!Dt_LrNo = DtLrNo
     R1!Dt_NetAmt = DtNetAmt
     R1!Dt_Oth = DtOth
     R1!Dt_OthAdd = DtOthAdd
     R1!Dt_RefNo = DtRefNo
     R1!Dt_Site = DtSite
     R1!Dt_Tax = DtTax
     R1!Dt_TaxAmt = DtTaxAmt
     R1!Dt_Total = DtTotal
     R1!Dt_VehNo = DtVehNo

R1.update
R1.close
Msgbox "Saved Succesfully"

End function
