Hi
I have a back end on another computer which in the main works fine. I have however one linked table which I cannot update.
My function is
The table "tblPaymentsDue" updates but I get the "object required" error when the code runs to the "tblGST" part.
Any assistance would be appreciated.
Thanks
I have a back end on another computer which in the main works fine. I have however one linked table which I cannot update.
My function is
Code:
Public Function AddToGSTAccount()
Dim dbsPaymentsDue As Database
Set dbsPaymentsDue = CurrentDb
Set rstTblPaymentsDue = dbsPaymentsDue.OpenRecordset("TblPaymentsDue")
rstTblPaymentsDue.AddNew
rstTblPaymentsDue!DateAdded = Now()
rstTblPaymentsDue!Payee = Forms!FrmAddNewPaymentDue.cboPayee
rstTblPaymentsDue!Description = Forms!FrmAddNewPaymentDue.cboPaymentFor
rstTblPaymentsDue!Amount = Forms!FrmAddNewPaymentDue.txtAmount
rstTblPaymentsDue!DateDue = Forms!FrmAddNewPaymentDue.txtDateDue
rstTblPaymentsDue.Update
Set rstTblGST = dbsPaymentsDue.OpenRecordset("TblGST")
rst.TblGST.AddNew
rst.TblGST!TransDate = Date
rst.TblGST!Deposit = Forms!FrmAddNewPaymentDue.txtAmount
rst.TblGST.Update
End Function
The table "tblPaymentsDue" updates but I get the "object required" error when the code runs to the "tblGST" part.
Any assistance would be appreciated.
Thanks