Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Feb 2011
    Location
    Iowa
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Using Date() function in OL2003 Contact view

    The Date() function does not update to current date in a computation for a specific view for OL2003 Contacts. I'm trying to compute age as of the current date. It currently computes from the date that the view was created. I cannot get it to 're-compute'. The formula is:

    IIf([Birthday]<>"None",DateDiff("yyyy",[Birthday],Date())-IIf(DateDiff("d",CDate(Month([Birthday]) & "/" & Day([Birthday]) & "/" & Year(Date())),Date())<0,1,0),0)

    This computes correctly when the view is created but will not update when I switch to the view at a later date. Any suggestions or workarounds welcome.

    Windows XP Media Center with SP3 and all updates applied.

    Thanks in advance.
    ScouterBob

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Bob,

    While in Outlook press Alt+F11 to get into the VBE, you probably already knew that just being safe. Click the question mark and search on "View Events". Take a look at the ViewSwitch Event. This looks like where you need to put some code.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    New Lounger
    Join Date
    Feb 2011
    Location
    Iowa
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts
    RG, thanks for the reply. After looking at the ViewSwitch Event, I may be in 'over my pay grade'. I don't know what code would be needed. As an longtime Excel (back to visicalc) user I was hoping for a quick and easy 'recalc' option buried somewhere.

    Actually, the method I'd prefer using is is to link to the OL Contacts from Access. When I try this method the Birthday and Anniversary fields are not in the Access table definition. Am I missing some setting here?

    I'd prefer the access link method for the increased options in sorting and formatting for my use. And, I'm more familiar with vba in Access.

    Thanks again, any further suggestions welcomed.

    Bob

  4. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Bob,

    When it comes to Outlook VBA, not what you'd call my strongest suit. I'm more an Access/Excel VBA kinda guy. I just thought I'd look for an event that could be hooked to update your view. Maybe someone here with more Outlook Object Model experience will chime in.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  5. The Following User Says Thank You to RetiredGeek For This Useful Post:

    ScouterBob (2011-07-26)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •