megatronixs
Registered User.
- Local time
- Today, 15:56
- Joined
- Aug 17, 2012
- Messages
- 719
Hi all,
I created a form that has unbound text boxes that will hold the information to create an invitation in Outlook. I have almost everything working, the only thing I still have problems is with getting the attendees from a subform in datasheet form.
I have the below code:
How can I use the
to enter more than one attendee from the datasheet?
the subform has only one column in it.
Greetings.
I created a form that has unbound text boxes that will hold the information to create an invitation in Outlook. I have almost everything working, the only thing I still have problems is with getting the attendees from a subform in datasheet form.
I have the below code:
Code:
Private Sub btn_create_invitation_Click()
Dim outMail As Object
Dim ol As Object
Set ol = CreateObject("OutLook.Application")
Dim myItem As Outlook.AppointmentItem
Dim myRequiredAttendee, myOptionalAttendee, myResourceAttendee As Outlook.Recipient
Set myItem = ol.CreateItem(olAppointmentItem)
myItem.MeetingStatus = olMeeting
myItem.Subject = Me.tranining_name_text
myItem.Location = Me.location_text
myItem.Start = Me.start_date_text & " " & Me.start_time_text
myItem.End = Me.end_date_text & " " & Me.end_time_text
'myItem.Duration = 480
Set myRequiredAttendee = myItem.Recipients.Add("Michael Jackson")
'Form!frm_recipient_enrol_creator_sub![recipient]
myRequiredAttendee.Type = olRequired
Set myOptionalAttendee = myItem.Recipients.Add("John Dude")
myOptionalAttendee.Type = olOptional
Set myResourceAttendee = myItem.Recipients.Add("Peter Ceterea)")
myResourceAttendee.Type = olResource
myItem.Body = Me.subject_text
myItem.Display
'myItem.Send
End Sub
How can I use the
Code:
'Form!frm_recipient_enrol_creator_sub![recipient]
the subform has only one column in it.
Greetings.