Tracking update dates

J

Jet

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
 
A

Allen Browne

Use the BeforeUpdate event procedure of the *form*.

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

Jet

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
 
J

Jet

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
 
A

Allen Browne

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.
 
J

Jet

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.
 
Top