DateDiff() is a function that you can use in a formula as well as in VBScript:
1) Bring up the Properties dialog for the control that's bound to the field where you want to store the calculated value and go to its Value tab.
2) At the bottom of the dialog, select "Calculate this formula automatically," and click Edit to bring up the formula editor.
3) Under Function, look under Date/Time, and select DateDiff(). That will put this shell into the editor:
DateDiff( interval , date1 , date2 , firstweekday , firstweek )
You can delete the last two parameters.
4) The first parameter, interval, is what unit do you want the result in -- days, weeks, etc. Days would be "d"
5) The other two parameters are your two date fields. You can type them in, surrounded by brackets. Or, you can insert them using the Field choices on the edit window.
6) Click OK to return to the form. Run the form, and enter some data to test.
If you run into problems, post back with the exact text from your own formula.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers