Microsoft Office Tutorials and References
In Depth Information
Creating Task Items Automatically in Outlook
Creating Task Items Automatically in Outlook
This application creates Task Items for the records in a database. Adding or
modifying a record in the database form will help manage related Task Items
in Outlook by using database form events.
Example file:
O012.mdb
Scenario: The sample database is an Order Entry database
that has been created by using the Access Wizard.
The OLTaskItemID field has been added to the Orders table to store the Task
Item EntryID to relate order records by Task Items.
OLTaskItemID field settings
¾
Parent Table: Orders
¾
Out
Data Type: Text Field
¾
Field Size: 255
¾
Allow Zero Length: True
¾
The following code has been added to the default Orders form in the auto-
generated database. There are three form event procedures (found on page 299 )
that are affected by this code:
Form_BeforeUpdate:
Creates task by adding/modifying a record
¾
Form_Delete:
Stores deleted record’s Task Item Entry ID
¾
Form_AfterDelConfirm: Deletes related Task Item object in Outlook
¾
Additional code is contained in the ‘Orders’ Form. The Access Wizard generated
this additional code. All Wizard-generated code and the associated Form are
listed in the table that follows the Remarks for this macro.
'Option Compare statement specifies the string comparison method¶
'(Binary, Text, or Database) for a module. If a module doesn't¶
'include an Option Compare statement, the default text comparison¶
'method is Binary.¶
Option Compare Database¶
Option Explicit¶
' * * * * *¶
'Day before count for the reminder¶
Const RemindBefore As Integer = 7¶
'Task Entry ID variable to store deleted record's OLTaskItemID¶
 
Search JabSto ::




Custom Search