updating a recordset

  • Thread starter Thread starter Dawn
  • Start date Start date
D

Dawn

I have this code in the after update event of a control.
It does not work. I adds a second record after the
control is update.

with rs
..findfirst
..Edit
.Fields("TransID") = me.ID
.Fields("UserID") = Me.UserID
.Fields("StateNo") = Me.StateNo
.Fields("Premium") = Me.Premium
.Fields("DateEntered") = Me.Date
.Fields("EnteredBy") = CurrentUser()
..Update
..Close
end with

Any help will be much appreciated

Thanks
 
Dawn,

I believe this happens because you are not specifying any criteria in your
..FindFirst statement (whereas, I assume, you should be looking for a record
where the PK is the one in the current record on your form?). Look at VB
help for the correct syntax of RecordSet.FindFirst.

HTH,
Nikos
 
Back
Top