Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a flag field after user changes record contents

Status
Not open for further replies.

RoyE

Technical User
Jun 25, 2003
10
US
I need to update a true/false field to true after I have changed a date field. I have forgotten to do update the true/false field in the past. Automating this would save considerable effort. The data accessed via a query.
 
put code in your After Update event for the true/false field to updated it based on what you want.

In the After Update, you might put something like this:

iif([FieldName] = Whatever, "True", "False")

where FieldName is the name of the field that data is being entered into and Whatever is the data being put there that you are testing against.
 
Keep in mind that in order to implement something like this, you must use forms. You can't do this with the datasheet view of a table or query.

In the after update event of the control:
Me.chkBeenUpdated = True

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
If I understand the replies correctly, I can only do this using a Form?

I can create a form but generally work from query's or datasheet views.
 
I recommend against working in table or query datasheets. There isn't enough control (as the case in point). You can create a form and then view it in datasheet mode.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top