Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling navigation navigation and menus with VBA

Status
Not open for further replies.

dan08

Technical User
Jan 7, 2013
51
0
0
US
So I am turning off full menus and the nav bar in my database to prevent users from mucking stuff up. But I am trying to make myself a backdoor so I can make changes.
I added this bit of code:

if user = "admin" then
CurrentDb.Properties("AllowFullMenus") = true
CurrentDb.Properties("StartUpShowDBWindow") = true
end if

This does not enable these properties right away. I have to close the db and reopen it. And if a user opens the db after me then these properties will be true.
How can I make the menus and nav bar visible only when I log in?
 
How are ya dan08 . . .

Microsoft said:
[blue] ... [purple]startup properties[/purple] ... [purple]aren't automatically recognized by the Jet database engine.[/purple] If a startup property hasn't been set previously, you must create it and add it to the Properties collection of the Database object.[/blue]

The above is true for [blue]Database[/blue] or [blue]CurrentProject![/blue] ... wish I had better news.

See Set StartUp Properties from VBA

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Dan08

Try holding down the SHIFT key while opening the database. Also, depending on the security settings for your database, you might see one or more security messages on startup. You need to continue holding down the SHIFT key until you close the security messages, or the startup options will not be bypassed.

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top