Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

duplicate data record = ?

Status
Not open for further replies.

wshm

Programmer
Dec 7, 2006
62
0
0
US
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])???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top