General :: Bypass Shift Key To Disable Ribbon And All Menus At Startup
May 4, 2014
I am able to bypass the shift key so I can disable ribbon and all menus at startup.
But the issue I have is anytime someone makes a copy of the database or it is their first time opening it they get prompted with the security warning:
"Security Warning - some active content has been disabled, click here to enable"
and it gives them complete access to see the back end of the database because while that warning message is popped up ... before they click "enable" they can go do anything in the database including see tables, data, and vba.
Once they click "enable content" that first time the bypass takes effect and the ribbon and all menus disappear, but if they dont click it they can navigate all around the db
In Access 2010 I'm setting and unsetting the bypass shift key property - set to true for users and set to false for me, the developer. No problem but what I can't figure out is how do I work out whether it is set or not?
Is there a way to change the shift key and use another key on startup?? Security for me isn't a big issue... but I'd still like to protect things from being tampered with. I don't want to use MS security (I use it on other DBs) but its not really approriate on the one I'm developing. Any ideas??
To set the AllowBypassKey property to False, follow these steps: 1. Start Access. 2. Open an Access database project. 3. In the Database window, point to Macro on the Tools menu, and then click Visual Basic Editor. 4. In the Visual Basic Editor, click Immediate Window on the View menu. 5. Type the following code or paste the following code in the Immediate window, and then press ENTER.CurrentProject.Properties.Add "AllowBypassKey", False
6. Close the Visual Basic Editor, and then close the Access database project. 7. Open the Access database project. Try to bypass the startup options that are set for the Access database project by holding down the SHIFT key while you open the Access database project.
The functionality of the SHIFT key that permits you to bypass the startup option is disabled. Although you hold down the SHIFT key to bypass the startup options, the startup options are executed. You cannot bypass the startup options.
If I hold down the SHIFT-key and click on my access database the database boots up with the startup options! I can't get into my database even if I hold down the SHIFT key!! Help me, please
I know that I can startup MS-Access manually and bypass the startup options, including any macro that is set to run automatically, by holding the Shift key down when launching the application. I have:
Code: Public Sub AccessStuff() Dim myaccess As New Access.Application myaccess.OpenCurrentDatabase(" orfs006slsops_repts\_RS DevSOPSOP.MDB") Dim db = myaccess.CurrentDb() End Sub
which works nicely and opens the database just fine. However, this mdb has a startup macro defined in it. I can't hold down the Shift key since I'm doing this from a program. In this case, how can I bypass the startup macro?
I have hidden most of the menu bars for my database (from the tools.. startup.. menu) and I dont have a backup of my latest database (yes, I know, stupid.) The only menus I have are File, Edit, Insert, Records, Window and Help. The database window is also not displayed.
How do I get them back..? My database is set to load a form on startup, all data is accessed via a set of forms linked from the first. I cant access the tables, design view, anything. I feel like such a muppet...
I am just about to set up user level security for my database. Before I do, how do I disable the holding the shift key thing when opening a database to get into the database window?
I want to make it so the users can't see the database window or access the backend data. As I will need to give permissions to use most of the tables, how is this done?
I need to disable the [Shift] key so that when the users open my MS Access database, they cannot by pass the open form and display the database window.
We had code that worked correctly with an MS Access 2000 MDB, and even works with an MS Access 2003 ADP, but the same code is ignored by MS Access 2003 MDB.
We add Module named "DisableByPassKey", here is the code...
Public Function SetProperties(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer On Error GoTo Err_SetProperties
Dim prps As AccessObjectProperties Dim prp As AccessObjectProperty Dim isPresent As Boolean
Set prps = Application.CurrentProject.Properties For Each prp In prps If (StrComp(prp.Name, strPropName, vbTextCompare) = 0) Then isPresent = True Exit For End If Next
If (isPresent) Then prps(strPropName).Value = varPropValue Else prps.Add strPropName, varPropValue End If
Exit_SetProperties: Exit Function
Err_SetProperties: If Err = 3270 Then 'Property not found Properties.Append prp Resume Next Else SetProperties = False MsgBox "Runtime Error # " & Err.Number & vbCrLf & vbLf & Err.Description Resume Exit_SetProperties End If
End Function
The code does not cause an error, it just seems to do nothing. When I set the [Shift] key to "disabled", then re-open the database, the [Shift] key works once again.
Ok, I'm new the access database security. I want to disable the shift key as soon as the database is opened to prevent users from getting to my data. I do have userlevel security in place with modal forms. This is my final step...I hope.
Is there any code or sample database that I may download? Thank you for your advice.
I have the following code in the on_load of all of my forms to disable all menus:Dim i As IntegerFor i = 1 To CommandBars.CountCommandBars(i).Enabled = FalseNext iThe problem is that when I open a report in preview mode I cannot close, print, etc.Two questions:1. Is the above approach the best way to disable all menus and toolbars?2. How do I add a custom toolbar (already created) to the report preview only. I've tried doing in in the properties and by me.toolbar = "custom toolbar." Neither approach works. I suspect that the code I've used to disable the menus is keeping me from adding custom menus where I want them?I should also mention that I have also turned off all of the menus, toolbars, etc. in the options/startup.Thanks for your help!
I have disabled the Ribbon using XML code in the USysRibbon table. Everything has worked fine, except that now when I click on two different tabs that exist on my form, the Form Tools Ribbon pops up with options to go to Layout, Design View, etc., and other options, too.
I have two subforms on this tab, but neither one has a Ribbon Name set (I didn't even know how to do that when I made them) where to look to see why this is happening. The Ribbon does not show at all on the other tabs like it is supposed to. It only shows when I click on my 3rd and 4th tabs, and then it disappears again when I click on other tabs.
I accidently unchecked the "allow full menus" option in Tools - Startup. When I did that, the menu bar at the top of my database no longer displayed the "Tools" option.
Does anyone know how I can restore the full menus option?
I am new to access and can do nothing with my database until I get my menus back.
I wanted a Switchboard page in Access to open automatically when the database was opened. I've done that but, as I did it, while in the Tools/Startup to set Display Form Page (in this case a switchboard page but it's not opening full screen and I ow have no way of editing anything), I stupidly de-selected the options there... Display database window, Display status bar, Allow built in tool bars allow toolbar/menu changes.
Now I have lost the tools Menu, the View Menu and others (where one sees, File, View etc at the top of the window) and I can't work out how to get them out. I can no longer view my Access pages in Design View so I can't amend the any pages.
Can anyone tell me how to get my View and Tools menus back on my Access app window?? It's a bit of an emergency... been up all night and have to hand this in as coursework at uni in about 3 hours and I've screwed up right at the end and can't do the last couple of things before putting it on a CD for my tutor to mark.
Help!
I'd also like to know how to get it to open the first form at full screen.
Normally when I hold down the shift key when opening an Access database it opens in development mode. When I do this on a certain database it does not. It still opens in program mode. If I hit F11 it goes into a sort of development mode but I do not get the ribbon bar at the top etc.
Has something been set on this database to stop it opening in development mode? Can I switch it off?
When I have the Home and Create default ribbons showing... then when I choose to Preview a report the Print Preview Ribbon is displayed and the Home and Create Ribbons are hidden or not visible.I have created a CustomRibbon and this CustomRibbon is not hidden when I choose to preview a report. The Print Preview ribbon is shown but the CustomRibbon keeps the focus and is not hidden.I would like for the CustomRibbon to not be visible.
I want to create an addin that adds a tab to the ribbon. I already have an add in installed that works exactly the way I want mine to, but I can't find the .mda file anywhere. I want to stick with the .mda so I have access to my forms. Here are some images of that add in I mention.
I am upgrading an Access 2000 system to 2007 and replacing user toolbars with Ribbons.I have a strange parsing error that I think is not my error.
I have placed the following control into a group:
<control idMso="GroupPrintPreviewClosePreview" label="Close Preview" enabled="true"/> and "the system" rejects it with Error Code 0x80004005 Element <group> is not expected in <group>I
t turns out that it is finding the word Group within the double quotes and interpretting is at part of the XML syntax.
Change to another idMSO and the problem goes away. Same happened with another control that had the word Group in the id.
I found the following getimage script but am not sure how to apply it to my button, I have seem various examples on sites but just can't get it to work. Can I somehow set the icon path like C:Image1.png
Code: Public Sub getImages(control As IRibbonControl, _ ByRef image) Set Image = LoadPicture(getAppPath & control.Tag)
' Maybe something like ' Set Image = LoadPicture(c:image1.png) End Sub
I've created a custom ribbon for my end users (Access 2010) and everything looks and works great except for one issue that is becoming a deal breaker for me and my end users:
I've got a number of tabs on my custom ribbon and on each tab there are a number of buttons that open various forms and reports. Anytime one of those forms or reports is opened and then closed, the ribbon jumps back to the first tab in my custom ribbon. So if you were on tab 3, opened a form and then closed it, you would be jumped back to tab 1.
Any workaround for what seems to be "by design" behavior for custom ribbons? The built-in ribbon does not do this.....