for save I write this........
With rs
.Open "Select * from Dad", con, adOpenDynamic, adLockOptimistic
.AddNew
!SrNo = cmbbillno
'!SrNo = GetNewNo("Dad")
!DadItems = cmbIName
!DadSize = cmbISize
!Dad = txtDadIQty
!Dadby = cmbOrTkBy.Text
!DadDate = DadDate
!deliverydate = deldate
!partyname = cmbPartyName
!amount = txtamount.Text
!due = txtdue.Text
!Receive = txtreceive.Text
.Update
.Close
MsgBox "Information is Saved", vbInformation, Me.Caption
End With
no problem to save data. but I want to save due in dad table and due table. so I write this code...
With rs
.Open "Select * from Dad", con, adOpenDynamic, adLockOptimistic
.AddNew
!SrNo = cmbbillno
'!SrNo = GetNewNo("Dad")
!DadItems = cmbIName
!DadSize = cmbISize
!Dad = txtDadIQty
!Dadby = cmbOrTkBy.Text
!DadDate = DadDate
!deliverydate = deldate
!partyname = cmbPartyName
!amount = txtamount.Text
!due = txtdue.Text
!Receive = txtreceive.Text
.Update
.Close
MsgBox "Information is Saved", vbInformation, Me.Caption
End With
With rs1
.Open "Select * from due where partyname = '" & Me.cmbPartyName & "'", con, adOpenKeyset, adLockOptimistic
If .Fields("due") <= -1 Then
.AddNew
!due = txtdue.Text
End If
.Fields("due") = rs1.Fields("due") + Val(Me.txtdue)
.Update
.Close
End With
problem is: in dad table it was saved. but in due table it wasn't create new data. it only update the exiting data. so what i need to do for save new data in due table?
e.g. long time after so i forget many thing.