aziz rasul
Active member
- Local time
- Today, 19:57
- Joined
- Jun 26, 2000
- Messages
- 1,935
I am trying to hide the toolbar of an external MS Access 2010 db. However the code doesn't work.
When I halt the code at
the ribbon disappears but when I open the file after the rest of the code has completed, the ribbon is still there!
Code:
Set dbs = OpenDatabase(strDatabaseName)
Set appAccess = New Access.Application
With appAccess
.OpenCurrentDatabase (strDatabaseName)
.Visible = True
.DoCmd.ShowToolbar "Ribbon", acToolbarNo
.CloseCurrentDatabase
.Quit
End With
Set dbs = Nothing
When I halt the code at
Code:
.DoCmd.ShowToolbar "Ribbon", acToolbarNo
the ribbon disappears but when I open the file after the rest of the code has completed, the ribbon is still there!