RainLover
VIP From a land downunder
- Local time
- Tomorrow, 03:12
- Joined
- Jan 5, 2009
- Messages
- 5,041
I have the following Code to hide Toolbars Menu etc.
This works fine and removes everything at the Top of the Screen Leaving only the Navigation Pane.
The following Code removes the Navigation Pane.
This works fine in A 2007 but Errors in 2003.
My problem is that I have a mixture of Machines. Some 2003 and Others 2007.
I need code to hide the Command Bars which I have without problem.
Next I need to hide the Navigation Pane.
The code I have is good for 2007 but Fails in 2003.
NavigateTo is not available in 2003.
I need a 2003 Database that also runs in 2007. I was thinking about checking the Version then if later than 2003 then run the code. If 2003 then do not run the code. I don't have the code to do this so if that is the solution does anyone have the Code to check the Version.
Hope I have explained myself correctly.
Code:
Public Function RemoveCommandBars()
Dim cmdBar As Object
On Error Resume Next
For Each cmdBar In CommandBars
DoCmd.ShowToolbar cmdBar.Name, acToolbarNo
Next cmdBar
End Function
The following Code removes the Navigation Pane.
Code:
Function HideNavigationPane(ByRef cCalledFromForm As Form)
If (cCalledFromForm.Modal = True) Then 'If the form is set to modal
cCalledFromForm.Modal = False 'Disable modal
DoCmd.NavigateTo "acNavigationCategoryObjectType" 'Select Navigation Pane
DoCmd.RunCommand acCmdWindowHide 'Hide selected
cCalledFromForm.Modal = True 'Enable modal
Else 'Else not modal
DoCmd.NavigateTo "acNavigationCategoryObjectType" 'Select Navigation Pane
DoCmd.RunCommand acCmdWindowHide 'Hide selected
End If
End Function
This works fine in A 2007 but Errors in 2003.
My problem is that I have a mixture of Machines. Some 2003 and Others 2007.
I need code to hide the Command Bars which I have without problem.
Next I need to hide the Navigation Pane.
The code I have is good for 2007 but Fails in 2003.
NavigateTo is not available in 2003.
I need a 2003 Database that also runs in 2007. I was thinking about checking the Version then if later than 2003 then run the code. If 2003 then do not run the code. I don't have the code to do this so if that is the solution does anyone have the Code to check the Version.
Hope I have explained myself correctly.