Need Help on Form to outlook Task

  • Thread starter Thread starter Pepper
  • Start date Start date
P

Pepper

I finally have some code that generates an outlook task
from a form button.

Private Sub MakeTask_Click()
Dim myMail As New Outlook.Application
Dim myTask As Outlook.TaskItem

Set myTask = myMail.CreateItem(olTaskItem)
myTask.Subject = "Follow up"
myTask.DueDate = #12/15/2003#
myTask.Body = "Follow up on deal with....."
myTask.Display

Set myMail = Nothing
Set myTask = Nothing


End Sub

I need 2 things:

1. How do I make the DueDate default to a date, for
instance 2 weeks from today? Can I make it a dLookup?

2. How do I get data from the Access record copied over
into the Subject or Body? I tried inserting [Pipeline]!
[Customer] and Me.Customer but neither one put the access
record data in the task.

Thanks in advance.
 
Never mind, found that it all depends on where you put
your quotation marks.

myTask.Body = "Follow up on Pipeline deal for " &
Me.Category & " with " & Me.Manufacturer


I'll try a dLookup and see if that works too.

Does anyone know where I can find the syntax for Contact
and Appointment fields?
 
Back
Top