Which Form Event for Inserting Data ??

  • Thread starter Thread starter Mike Thomas
  • Start date Start date
M

Mike Thomas

In Access 2000, I have a form which is set up as a continuous data sheet.

Whenever the user adds a new record by tabbing to the next row and entering
data, I need a foolproof way to enter the data below into the new record.

Right now, I am using the form's AfterUpdata event as below. I am not sure
whether this is the best way to do this.

Does anyone know of a more reliable method?

Private Sub Form_AfterUpdate()
Me.Recordset.Edit
Me.Recordset!PackLineKey = lngPackLineKey
Me.Recordset!PackHeadKey = lngPackHeadKey
Me.Recordset!PartKey = lngPartKey
Me.Recordset.Update
End Sub

Many thanks
Mike Thomas
 
I think it would be better in the Before Update event. Using the After
Update event means it will update twice.
 
Back
Top