Modifying Contact Form with Last Updated field

K

Keith S.

Hi there,

I've added an extra page to the standard Contacts Form to include a few
extra fields, one of them for the "Last Updated" date. I set the Properties
for this field so that the initial value is Date(), and then check calculate
this formula automatically.

Whenever I visit that page and make a change, the Last Updated field gets
updated with the current timestamp. So far, so good.

The problem (I think) appears to be when I make a change to one of the OTHER
pages of the form, but not that page with the custom field.

Is there a way to set the field on one page to automatically update whenever
ANY part of the entry is updated?

Thanks,
Keith
 
K

Keith S.

Er, I forgot to elaborate what the "problem" is. Whenever I make a change to
one of the pages of the form that doesn't contain this custom field, the
value doesn't get updated.

Keith
 
S

Sue Mosher [MVP-Outlook]

Using a formula for this scenario won't accomplish what you want. What you need is code behind the form to set the value when the user saves changes, e.g.:

Function Item_Write()
Item.UserProperties("Last Updated") = Date()
End Function
 
K

Keith S.

Thanks, Sue - that did the trick!

If you don't mind a newbie followup question, why does the formula not work
in this case? Does a formula only apply to one page, whereas code can apply
to all pages?

By the way, your web site (in your sig) has already answered just about
every other question I've had so far on customizing outlook forms. Great job.
Definitely makes me want to buy the book if I start getting deeper into
Outlook. So thank you for that, as well.

Keith
 
S

Sue Mosher [MVP-Outlook]

Your formula would always show the current date, not the last time the item was updated. I have no ideas about the strange behavior you reported, though.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 

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

Top