
Outlook View Control disappears after viewing item
Hi,
I am writing an Access application and have a form with
an OVC.
There are three buttons which switch views between inbox,
calendar and tasks.
This all works fine.
However, if I open an item in one of the views (say,
double click in the inbox to open an email) and
immediately close it, then the next time i change view
the OVC disappears.
Any ideas? OfficeXP SP2.
Heres the code:
Private Sub chkFilter_Click()
If chkFilter.Value Then
Me.viewControl.Restriction = "[Categories]
= 'CMS'"
Else
Me.viewControl.Restriction = ""
End If
End Sub
Private Sub cmdCalendar_Click()
Me.viewControl.Visible = False
Me.viewControl.Folder = "Calendar"
Me.viewControl.View = "Day/Week/Month"
Me.viewControl.Visible = True
End Sub
Private Sub cmdInbox_Click()
Me.viewControl.Visible = False
Me.viewControl.Folder = "Inbox"
Me.viewControl.View = "Messages with AutoPreview"
Me.viewControl.Visible = True
End Sub
Private Sub cmdTasks_Click()
Me.viewControl.Visible = False
Me.viewControl.Folder = "Tasks"
Me.viewControl.View = "Simple List"
Me.viewControl.Visible = True
End Sub
Private Sub Form_Load()
Me.viewControl.Folder = "Calendar"
Me.viewControl.View = "Day/Week/Month"
Me.viewControl.Width = 14900
Me.viewControl.Height = 6200
chkFilter_Click
Me.viewControl.Visible = True
End Sub