Code Examples

Hide the Message Bar

acCmdHideMessageBar

I found this piece of code on the Utter Access web site. unfortunately I am unable to attribute it to a particluar person. It was designed to solver the following problem.

I am trying to find a way to disable the "This database has been opened read-only" message bar that comes up when users open my front-end application housed in SharePoint. The application is designed to be "read-only" as all of the data is linked to a backend database and the frontend is an accde file being called from a SharePoint listview. The message only confuses some of my users so I would like to disable it somehow. I can only find references to forum where people want to disable it but have data in their frontend app which is a different issue.

Solution found:

This command should be called from the Form_Current event of the splash or startup form. The read only message bar looks to be triggered when the form actually connects to the data.

'***************** Code Start *******************
Public Function CloseMessageBar()
On Error GoTo CloseMessageBar_Error

   'CLOSE THE MESSAGE BAR
   DoCmd.RunCommand acCmdHideMessageBar

CloseMessageBar_Exit:
   Exit Function
CloseMessageBar_Error:
   Call ErrorLog(Err.Number, Err.Description, Err.Source, "CloseMessageBar", "fcn_CloseMessageBar", Erl)
   Resume CloseMessageBar_Exit
End Function

'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.