Disable default Menu Bar

G

Guest

Hello!
This is a simple question, unfortunately not for me :((
I've got a database in which there are almost all toolbars are hidden except of 'Menu Bar" while it opens. This database has few forms, and one of them - which is not loaded first (Form14) has a textbox called Text52. What I want to acheive is to disable even "menu Bar" depending on value from Text52. e.g.:
This is the code which runs on onOpen form's event:

If Forms!Form14!Text52 = "1" Then
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
End If

But nothing really happens, the "Menu bar" is still displayed :(

Can anybody help me?
Thanx in advance
 
M

Marshall Barton

Confused said:
Hello!
This is a simple question, unfortunately not for me :((
I've got a database in which there are almost all toolbars are hidden except of 'Menu Bar" while it opens. This database has few forms, and one of them - which is not loaded first (Form14) has a textbox called Text52. What I want to acheive is to disable even "menu Bar" depending on value from Text52. e.g.:
This is the code which runs on onOpen form's event:

If Forms!Form14!Text52 = "1" Then
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
End If

But nothing really happens, the "Menu bar" is still displayed :(


Try moving the code to the form;s Load event or where ever
the value of Text52 is set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top