Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 09:58 AM
keni
Guest
 
Posts: n/a
Default Disabling Design View of a Form

One method of disabling Design View is to create an MDE database.
Without going into details, this won't work in my situation. What I
need is just a snippet of VBA code that will disable the design view of
my Employees form so the data entry people cannot enter design view and
modify it. I know very little about VBA, but surely there must be some
simple code like:

Sub
Designview.form = 0
End sub

or something along these lines that will accomplish the task?
- Keni -

  #2  
Old November 13th, 2005, 09:59 AM
Jan Jørgensen
Guest
 
Posts: n/a
Default Re: Disabling Design View of a Form


"keni" <zken@tongaken.org> skrev i en meddelelse
news:1113598470.400974.301690@f14g2000cwb.googlegr oups.com...[color=blue]
> One method of disabling Design View is to create an MDE database.
> Without going into details, this won't work in my situation. What I
> need is just a snippet of VBA code that will disable the design view of
> my Employees form so the data entry people cannot enter design view and
> modify it. I know very little about VBA, but surely there must be some
> simple code like:
>
> Sub
> Designview.form = 0
> End sub
>
> or something along these lines that will accomplish the task?
> - Keni -
>[/color]

I have a yes/no field that can be toggled from the administorscreen.
In the administratorscreen there are instructions that after toggling, the
database need to be re-started.

In the table "Parametre", the yes/no field is called "Show_menus".

Now cut and paste the following into your database :

Sub SetStartupProperties()
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
allow= DLookup("[Show_menus]", "parametre")
If allow <> -1 Then
'ChangeProperty "StartupForm", , "Startform"
ChangeProperty "StartupShowDBWindow", DB_Boolean, False
ChangeProperty "StartupShowStatusBar", DB_Boolean, False
ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False
ChangeProperty "AllowFullMenus", DB_Boolean, False
ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
ChangeProperty "AllowSpecialKeys", DB_Boolean, False
ChangeProperty "AllowBypassKey", DB_Boolean, False
Else
'ChangeProperty "StartupForm", , "Startform"
ChangeProperty "StartupShowDBWindow", DB_Boolean, True
ChangeProperty "StartupShowStatusBar", DB_Boolean, True
ChangeProperty "AllowBuiltinToolbars", DB_Boolean, True
ChangeProperty "AllowFullMenus", DB_Boolean, True
ChangeProperty "AllowBreakIntoCode", DB_Boolean, True
ChangeProperty "AllowSpecialKeys", DB_Boolean, True
ChangeProperty "AllowBypassKey", DB_Boolean, True
End If

End Sub


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles