Automatically Changing the value in a table

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I have a form that I'm using to revise records in a
table. When the form is saved, I want to "Revised" field
in the table to automatically change from No to Yes.

Is there code I can add to do that behind the scenes and
not actually ask that question on the form since the only
time the form would be used is when information for a
record is being revised. Thanks
 
I would add the revised field to the form and make it invisible. Then in the
before Update event procedure for the form I would set the value of the
reveised field to true.


HTH
Kat
 
Include the Field Revised in the RecordSource of the Form
and use the Form_BeforeUpdate Event to change the value
like:

Me.Revised = True

Note: You many need to check for NewRec in the
BrforeUpdate Event if you don't want to set Revised to
True for new Record.

HTH
Van T. Dinh
MVP (Access)
 
My field is named Revised. I will make it invisable, but
shouldn't I set the value to true in the after update or
on save button. Is there VBA code I can use to update the
Revised field to true or yes.

thanks
 
me.revised = true
you can put it in the Before Update event or the Save Button(if you have
one, be sure to put it before the save record action).
AfterUpdate would change AFTER the record has already been saved.

Kat
 
Back
Top