bruceblack
Registered User.
- Local time
- Today, 23:30
- Joined
- Jun 30, 2017
- Messages
- 119
Hi everyone! Small problem. Im trying to set a reminder (working!)
But i get error that saving and going to new record is not available now.
Why is it such a problem to run this after my reminder code?
I can't seem to find the problem reading about it. Anyone can explain?
Cheers!!!
But i get error that saving and going to new record is not available now.
Why is it such a problem to run this after my reminder code?
I can't seem to find the problem reading about it. Anyone can explain?
Cheers!!!
Code:
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
With OutlookTask
.assign
.Recipients.Add ([EMAIL="test@gmail.com"]test@gmail.com[/EMAIL])
.Subject = "Registering at desk. Please provide documents."
.body = "Registering at the expedition desk."
.startdate = Me.registrationdate
.ReminderSet = True
.DueDate = Me.registrationdate
.ReminderPlaySound = True
'.ReminderSoundFile = 'Modify path.
'.Display
.send
End With
Set OutlookApp = Nothing
Set OutlookTask = Nothing
DoCmd.RunCommand acCmdSaveRecord
Me.registeredyesorno.Value = "Yes"
Me.hidesubmitbutton.Value = "Yes"
DoCmd.GoToRecord , , acNewRec
MsgBox "Registration complete!"