473,699 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show Menus/Toolbars on Startup

I have set the Startup properties to the following...
All menus, toolbars, etc are turned off plus these are unchecked
Allow Full Menus
Allow Built-in Toolbars
Allow Default Shortcut Menus
Allow Toolbar/Menu Changes
Use Access Special Keys
For admin users...
I would like to run some VB code in my Main startup form (OnOpen) to
show the default menu/toolbars as if the startup properties were not
set.
However I would like to leave the startup properties in tact, in case a

non-admin user logs in.
I use...
If Admin then
CommandBars("Da tabase").Visibl *e = True ' Trying to show a menu
else 'non-admin
'non-admin code
end if
The issues are...
1. The CommandBar "Menu Bar" is displayed after the Main form is
visible, even with the startup properties set to turn off all
menus/toolbars. The menu seems limited and only related to forms and
records. The menu is definately not like the standard startup menu for
an Access database.
This seems to contradict what the startup properties suggest.
2. Using CommandBars("Da tabase").Visibl *e = True in the OnOpen event
for
the case of admins does not show the toolbar or any other toolbar,
though I have not tried them all. I tried "Form View", "Formatting
(Form/Report)".
I do notice that the menus show up for a short duration along with the
normal default menus and then disappear after the Main form is visible.

It seems that the startup properties take effect after the Main form is

visible.
However, without restarting Access, if I restart the form (I enabled
the database window) the menus show up as coded.
But, the menus dont behave appropriately to the context of the window,
ie the "Form View" menu remains even if I click on the Database window.

Is there a way to bring up the default menu behavior for the admin case

without having to reset the startup properties and restarting?
TIA

Nov 13 '05 #1
1 11314

<ce*******@yaho o.com> skrev i en meddelelse
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
I have set the Startup properties to the following...
All menus, toolbars, etc are turned off plus these are unchecked
Allow Full Menus
Allow Built-in Toolbars
Allow Default Shortcut Menus
Allow Toolbar/Menu Changes
Use Access Special Keys
For admin users...
I would like to run some VB code in my Main startup form (OnOpen) to
show the default menu/toolbars as if the startup properties were not
set.
However I would like to leave the startup properties in tact, in case a

non-admin user logs in.
I use...
If Admin then
CommandBars("Da tabase").Visibl *e = True ' Trying to show a menu
else 'non-admin
'non-admin code
end if
The issues are...
1. The CommandBar "Menu Bar" is displayed after the Main form is
visible, even with the startup properties set to turn off all
menus/toolbars. The menu seems limited and only related to forms and
records. The menu is definately not like the standard startup menu for
an Access database.
This seems to contradict what the startup properties suggest.
2. Using CommandBars("Da tabase").Visibl *e = True in the OnOpen event
for
the case of admins does not show the toolbar or any other toolbar,
though I have not tried them all. I tried "Form View", "Formatting
(Form/Report)".
I do notice that the menus show up for a short duration along with the
normal default menus and then disappear after the Main form is visible.

It seems that the startup properties take effect after the Main form is

visible.
However, without restarting Access, if I restart the form (I enabled
the database window) the menus show up as coded.
But, the menus dont behave appropriately to the context of the window,
ie the "Form View" menu remains even if I click on the Database window.

Is there a way to bring up the default menu behavior for the admin case

without having to reset the startup properties and restarting?
TIA

I use the below mentioned code.
Maybe that can help you.
I set a boolean value in the Administrator screen.
The name is "tillad_menuer" .

Sub SetStartupPrope rties()
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
tillad_menuer = DLookup("[Vis_menuer]", "parametre" )
If tillad_menuer <> -1 Then
'ChangeProperty "StartupFor m", , "Startform"
ChangeProperty "StartupShowDBW indow", DB_Boolean, False
ChangeProperty "StartupShowSta tusBar", DB_Boolean, False
ChangeProperty "AllowBuiltinTo olbars", DB_Boolean, False
ChangeProperty "AllowFullMenus ", DB_Boolean, False
ChangeProperty "AllowBreakInto Code", DB_Boolean, False
ChangeProperty "AllowSpecialKe ys", DB_Boolean, False
ChangeProperty "AllowBypassKey ", DB_Boolean, False
Else
'ChangeProperty "StartupFor m", , "Startform"
ChangeProperty "StartupShowDBW indow", DB_Boolean, True
ChangeProperty "StartupShowSta tusBar", DB_Boolean, True
ChangeProperty "AllowBuiltinTo olbars", DB_Boolean, True
ChangeProperty "AllowFullMenus ", DB_Boolean, True
ChangeProperty "AllowBreakInto Code", DB_Boolean, True
ChangeProperty "AllowSpecialKe ys", DB_Boolean, True
ChangeProperty "AllowBypassKey ", DB_Boolean, True
End If

End Sub

Function ChangeProperty( strPropName As String, varPropType As Variant,
varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFound Error = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties( strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFound Error Then ' Property not found.
Set prp = dbs.CreatePrope rty(strPropName , _
varPropType, varPropValue)
dbs.Properties. Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function

Private Sub Form_Activate()
DoCmd.Maximize
Call SetStartupPrope rties
Kode = ""
End Sub
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1904
by: Jason Webb | last post by:
Dear Microsoft, The current "Windows.Forms" controls included in the .Net Framework are good, but in many ways they're pretty basic, and I think it's time that you take Windows.Forms to the next level. I really think that the menus and toolbars used in Office 2003 should be added to the .Net Framework as standard controls in the next release of the Framework and VS.NET, codenamed "Visual Studio .Net for Yukon." This would truly take...
4
8571
by: Karl Irvin | last post by:
In a 2000, can you transfer custom menus and toolbars to a new Access database. My mdf file is not compiling and I'm importing all data to a new database but don't see a way to get the menus/toolbars over.
2
1909
by: Miguelito Bain | last post by:
Hi Everyone- I have a problem with my menu bars disappearing. Here's a little backround... I have one main database that has a page called "Prior Records." There are several command buttons that link older databases via the hyperlink property. I had an old databae in Access 2000 File Format. I made a backup copy then converted it to Access 2002 File Format. After I click the command button to bring up an old database, the menu bars
2
2168
by: Heather | last post by:
I'm working on a db that has custom toolbars and menus. So all the commands for editing/designing forms, etc are gone. How do I get the default toolbars and menus back? I have no way to contact the db's creator. Thanks! Heather
0
1166
by: Frank Rizzo | last post by:
I've noticed that the toolbars and menu controls got an overhaul in vs2005. Is there anyway to make them work like they do in 3rd party solutions (like infragistics or devexpress) or MFC (back in the day) where the menu item and the toolbar item is the same control. In other words, if you disable the toolbar item, the corresponding menu item also gets disabled. Also, a pointer to a good tutorial on using the toolbars/menus with tips...
1
3364
by: bjaeger | last post by:
A few months back I was "playing" with an Access 2000 application I created. I somehow disabled the delete option from all menus, toolbars, and context menus. Now I cannot do any maintenance on the database because I cannot delete anything. I do not have a database password set up, or users with security and rights. I cannot find an option for how I did this and cannot remember how I did it. Any ideas?????
6
1812
by: GOI via AccessMonster.com | last post by:
Good day! I was fiddling around with the Tools-Startup menu. I unchecked the following checkboxes: Display Status Bar Allow Full Menus Allow Default Shortcut Menus Allow Built-in Toolbars Allow Toolbar/Menu Changes
6
3966
by: terrycr | last post by:
In an attempt to clean up my form I went to TOOLS STARTUP and removed check marks from the following: Allow full menus Allow default shortcut menus Allow built in toolbars Allow toolbar/menu changes. How do I bring those back as I can't get to TOOLS STARTUP? Help!!!!
1
2150
by: ApexData | last post by:
I have a ShortCutMenu that is made available on the RightClick of the mouse. The OnAction property has my custom function: =ComboBoxEditor() I believe that, in the ONAction property, I could do something like this to allow or prohib the use of the function??? =iif(blnUseThis,ComboBoxEditor(),Msgbox "NotAvailable") Is there a way to enable or disable the actual menu option from even showing on the rightclick of the mouse. For example
0
8622
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7761
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5878
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4634
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.