Update a Yes/No field

  • Thread starter Thread starter LarryB
  • Start date Start date
L

LarryB

I have a table that I use to track the service on vehicles. One of my
fields is Active a Yes/No field with the default set to Yes. What I would
like to do is when the next service is completed on the vehicle, I would
like to automatically change the previous record to No. Is there a way
that I can do this programically?
 
Larry

Assuming that your application is designed to take advantage of Access
Forms, you can add a procedure to the form's BeforeUpdate event (or to the
AfterUpdate event of the control you use to indicate "completed"). The
procedure will simply set the value of that Yes/No field.

You could include the Yes/No field on the form, but have the form help you
set it.
 
Back
Top