Save current field after change

R

Rhonda

How do I save the current field's value without moving to
antother record?

I have a list of records - and I can change a value in a
record. If I make a requery without having moved to
another record, my data change causes an error.
 
J

John Vinson

How do I save the current field's value without moving to
antother record?

I have a list of records - and I can change a value in a
record. If I make a requery without having moved to
another record, my data change causes an error.

Put a line in the AfterUpdate event of the textbox or other control
bound to the field:

If Me.Dirty = True Then Me.Dirty = False

This will force the currently edited record to be written to disk.

Note that requerying the Form will close the current record and move
you to the first record in the form's recordsource.

John W. Vinson[MVP]
 
Top