Tracking update dates

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

Guest

I have a form that houses all the fileds of my "Main Table". One of those
fields is "Last updated on".

How do I get the date automatically updated to today in "Last updated on" if
I make any change on any field.

Thanks
 
Use the BeforeUpdate event procedure of the *form*.

Add the line:
Me.[Last updated on] = Now()
 
Added the line in the "Before Update" and now getting error message:
"...can't fiund the macro ME".

Also lost ability to go to the next or previous record

Jet

Allen Browne said:
Use the BeforeUpdate event procedure of the *form*.

Add the line:
Me.[Last updated on] = Now()

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Jet said:
I have a form that houses all the fileds of my "Main Table". One of those
fields is "Last updated on".

How do I get the date automatically updated to today in "Last updated on"
if
I make any change on any field.

Thanks
 
Inserted that line in the BeforeUpdate procedure of the form, now getting
error message that the Me Macro does not exists and lost ability to navigate
through the records on my form.

Jet

Allen Browne said:
Use the BeforeUpdate event procedure of the *form*.

Add the line:
Me.[Last updated on] = Now()

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Jet said:
I have a form that houses all the fileds of my "Main Table". One of those
fields is "Last updated on".

How do I get the date automatically updated to today in "Last updated on"
if
I make any change on any field.

Thanks
 
1. Open the form in design view.

2. Open the Properties box (View menu).

3. Make sure the Title of the Properties box reads "Form", not the name of
some control.

4. Set the Before Update property of the form (Events tab of Properties box)
to:
[Event Procedure]

5. Click the Build button (...) beside the property.
Access opens the code window.

6. Insert the line of text in the event procedure, between "Private Sub..."
and "End Sub".

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Jet said:
Inserted that line in the BeforeUpdate procedure of the form, now getting
error message that the Me Macro does not exists and lost ability to
navigate
through the records on my form.

Jet

Allen Browne said:
Use the BeforeUpdate event procedure of the *form*.

Add the line:
Me.[Last updated on] = Now()


Jet said:
I have a form that houses all the fileds of my "Main Table". One of
those
fields is "Last updated on".

How do I get the date automatically updated to today in "Last updated
on"
if
I make any change on any field.
 
Beatiful!!!

Thanks for your help and greatings from Montreal!!

Jet

Allen Browne said:
1. Open the form in design view.

2. Open the Properties box (View menu).

3. Make sure the Title of the Properties box reads "Form", not the name of
some control.

4. Set the Before Update property of the form (Events tab of Properties box)
to:
[Event Procedure]

5. Click the Build button (...) beside the property.
Access opens the code window.

6. Insert the line of text in the event procedure, between "Private Sub..."
and "End Sub".

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Jet said:
Inserted that line in the BeforeUpdate procedure of the form, now getting
error message that the Me Macro does not exists and lost ability to
navigate
through the records on my form.

Jet

Allen Browne said:
Use the BeforeUpdate event procedure of the *form*.

Add the line:
Me.[Last updated on] = Now()


I have a form that houses all the fileds of my "Main Table". One of
those
fields is "Last updated on".

How do I get the date automatically updated to today in "Last updated
on"
if
I make any change on any field.
 

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