Keep dropping my Menu Bar

mrgreen

Registered User.
Local time
Today, 12:53
Joined
Jan 11, 2008
Messages
60
When I open my application I simply hide my Menu Bar then when I close my form I make it visible. This works when I step through the code but in real time I lose my Menu Bar when I hold the shift button and open my file. So now when I open every other Access database or even go to create a new one my Menu Bar is missing. There must be something simple? Any suggestions would be great! If posting code is necessary I can work on that - have it on my work laptop.
 
When I open my application I simply hide my Menu Bar
when I close my form I make it visible.

These two statements seem strange to me. Should you not try to add your menus back when the application closes. Do a little search here on the forum for how to make something run before shutting down MSAcess.

Put a message box in the middle of your close down code adding the menus back, is it called every time?

I think you should look at adding your menus back when MSAccess closes. I believe there are 2 methods, 1 is to permantely have a small transparent form open, that of course will only close if the users ends MSAccess and when this form closes you run your closing down code.

The other method which I use is on every form I have this

Code:
Private Sub Form_Close()
On Error GoTo Err_Form_Close


If blnClose = False Then
Call closeDownProperly
End If

Exit_Form_Close:
    Exit Sub

Err_Form_Close:
    MsgBox Err.Description
    Resume Exit_Form_Close
End Sub
Now when I open and close forms I set my Global Variable of blnClose to true and thus the above code is not executed. However should the users press the X button or close some other way, then the routine closeDownProperly would be run.
 

Users who are viewing this thread

Back
Top Bottom