Update Field on a Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to have a field on my form that automatically puts the date and time
the data in any other field on the form was last updated. Any help is
appreciated. Thanks
 
to do that, you need to store the "last updated" date/time in a field in the
form's underlying table. remember that data is not stored in forms - it's
stored in tables, and displayed in forms.

you can add a field to the table, i'll call it ModifiedDate, with data type
Date/Time. if your form is bound to a query or SQL statement (rather than
directly to the table), then make sure you add the ModifiedDate field to the
RecordSource. add a control to the form, bound to field ModifiedDate, and
give it the same name "ModifiedDate". in the *form's* BeforeUpdate event
procedure, add the following code, as

Me!ModifiedDate = Now

if you don't know how to create an event procedure, see the illustrated
instructions at http://home.att.net/~california.db/downloads.html (scrolling
down to the CreateEventProcedure.pdf link).

hth
 

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