Delete record in event

R

Ron

Hi,

I have a txtbox bound to table.

On change event, I need either change the value in that record (that mean
not creating a new record) or create a new record but delete the previous
one.

In that table there is only 1 record.

Thank you,
Ron
 
M

Michel Walsh

HI,


You can use DoCmd.RunSQL to run an action query (such as append or delete).
To modify, if you have a recordset, a DAO recordset, pointing to the record
to be updated, use it somehow like:


rst.Edit
rst.FieldName = newValue
rst.OtherFieldName = someOtherValue
rst.Update



Hoping it may help,
Vanderghast, Access MVP
 
Top