Delete record in event

  • Thread starter Thread starter Ron
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top