I've previously posted a coding that i thought it'll work.
I've just thought of one problem
Dim DB As DAO.Database
Dim RS As DAO.Recordset
Set DB = CurrentDb()
Set RS = DB.OpenRecordset("tbl_PSC", dbOpenDynaset)
Set bs = DB.OpenRecordset("tbl_PSCtx", dbOpenDynaset)
If Me.txtContractNo = DLookup("ContractNo", "tbl_PSC", "contractno = '" & Me![txtContractNo] & "'") Then
RS.Edit
RS![UpdatedConAmt] = Me![txtTranxAmt] + bs![TranxAmt]
RS.Update
etc -----------------
this works fine if there's only one record found in tbl_PSCtx (by one i mean that shares contractno)
what happens if I have 5 records that shares the same Contract Number?
can i do such thing as
RS![UpdatedConAmt] = Me![txtTranxAmt] + bs!Dsum([TranxAmt])???
I've just thought of one problem
Dim DB As DAO.Database
Dim RS As DAO.Recordset
Set DB = CurrentDb()
Set RS = DB.OpenRecordset("tbl_PSC", dbOpenDynaset)
Set bs = DB.OpenRecordset("tbl_PSCtx", dbOpenDynaset)
If Me.txtContractNo = DLookup("ContractNo", "tbl_PSC", "contractno = '" & Me![txtContractNo] & "'") Then
RS.Edit
RS![UpdatedConAmt] = Me![txtTranxAmt] + bs![TranxAmt]
RS.Update
etc -----------------
this works fine if there's only one record found in tbl_PSCtx (by one i mean that shares contractno)
what happens if I have 5 records that shares the same Contract Number?
can i do such thing as
RS![UpdatedConAmt] = Me![txtTranxAmt] + bs!Dsum([TranxAmt])???