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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide a forms properties window 1

Status
Not open for further replies.

Duncanmcl

Programmer
Dec 23, 2000
61
US
When a forms window is opened by a user (even in a semi-secure environment),I don't want then to see or use the forms properties window....I know I can turn it off (not visible) via the main menu (alt-enter)....but I want to control this option via VBA code. Its part of my desire to restrict access to DB or Modules....and if its available (visible) a user can get to the module code...even if allowbypasskey has been set to false. I know it can be closed manually...What is the syntax?

TIA Jim
 
well i geuss there is a function called me.menu.enabled = False

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
How are ya Duncanmcl . . .

Why is the [blue]AllowDesignChanges[/blue] property enabled on user machines in the first place?

The problem you have is [blue]detecting wether the properties window is open or not[/blue] and this can only be done with API!
[blue]GetWindow
DestroyWindow[/blue]
However DestroyWindow is unreliable in access in handling subWindows (timers need to be used).

The menubutton, hotkey and . . .
Code:
[blue]   docmd.RunCommand acCmdProperties[/blue]
. . . simply toggle the properties.

What you can do is set a [purple]password[/purple] for [blue]all your modules[/blue] including all form/report modules:
[ol][li]From any VBE window [blue]MenuBar - Tools - ProjectName Properties - Protection Tab[/blue][/li]
[ol a][li]Check [blue]Lock project for viewing[/blue][/li]
[li]Enter the password & verify.[/li]
[li]Click OK[/li][/ol]
[li][blue]Reboot the DB and see if you can break into the VBE without password![/blue][/li][/ol]

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
Thanks...the PW method add a 2nd layer of protection...and thats great....I see the accmdproperties constant as you mentioned just toggle on then next time off...I want to keep it off. As I mentioned....on my last save before I turn it over to users, I can close it manually...then with my front end PW...hot keys for bypass not available (except be me knowing where the trigger is)...and the modules PW....the code should be secure. Bottom line...no way to programetically close that forms property window...right? You mentioned allowdesignchanges, how to setup so they can't but I can?

Many thanks...happy holiday...JIm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top