473,770 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disabling Shift Key to Show DB Window on Startup

365 Contributor
Hello peeps!!

got another problem that is outta my league....

What i want (and can do) is to disable the DB window on startup,
(what i cant do) disable the shift key load...

Also

i need a way to get back the DB window

currently i have a custom logon and a table with logon info

tblLogonData:
StaffID,integer , FK
UserName, String
Password, String
AccessLevel, String (SuperAdmin, Admin, User)

the Access level as you would expect limits access, and i want only the superadmins (or posibly even another option (i.e. Manager..) to see the DB window.

Can this be done with out too much trouble?
(Preferably i would like to Completely disable the shift key load and handle that "In House")

Thanks if ya can help
Jan 16 '08 #1
15 11205
Dököll
2,364 Recognized Expert Top Contributor
Hello peeps!!

got another problem that is outta my league....

What i want (and can do) is to disable the DB window on startup,
(what i cant do) disable the shift key load...

Also

i need a way to get back the DB window

currently i have a custom logon and a table with logon info

tblLogonData:
StaffID,integer , FK
UserName, String
Password, String
AccessLevel, String (SuperAdmin, Admin, User)

the Access level as you would expect limits access, and i want only the superadmins (or posibly even another option (i.e. Manager..) to see the DB window.

Can this be done with out too much trouble?
(Preferably i would like to Completely disable the shift key load and handle that "In House")

Thanks if ya can help
Hey there!

This may not be of great use but I fetched it for you anyway:

http://www.thescripts.com/forum/thread748067.html

Perhaps you can use some of what is said:-)

Please stay tuned for added support, and good luck to you...

Dököll
Jan 17 '08 #2
ADezii
8,834 Recognized Expert Expert
Hello peeps!!

got another problem that is outta my league....

What i want (and can do) is to disable the DB window on startup,
(what i cant do) disable the shift key load...

Also

i need a way to get back the DB window

currently i have a custom logon and a table with logon info

tblLogonData:
StaffID,integer , FK
UserName, String
Password, String
AccessLevel, String (SuperAdmin, Admin, User)

the Access level as you would expect limits access, and i want only the superadmins (or posibly even another option (i.e. Manager..) to see the DB window.

Can this be done with out too much trouble?
(Preferably i would like to Completely disable the shift key load and handle that "In House")

Thanks if ya can help
  1. Copy and Paste the following Public Function into a Standard Code Module:
    Expand|Select|Wrap|Line Numbers
    1. Public Function ChangeProperty(strPropertyName As String, varPropertyType As Variant, varPropertyValue As Variant) As Integer
    2. Dim MyDB As Database, MyProperty As Property
    3.  
    4. Set MyDB = CurrentDb()
    5.  
    6. On Error GoTo Err_ChangeProperty
    7. 'Property exists, so set its Value
    8. MyDB.Properties(strPropertyName) = varPropertyValue
    9. ChangeProperty = True
    10.  
    11. Exit_ChangeProperty:
    12.   Exit Function
    13.  
    14. Err_ChangeProperty:
    15. If Err.Number = 3270 Then       'Property not found
    16.   'Since the Property isn't found, create it!
    17.   Set MyProperty = MyDB.CreateProperty(strPropertyName, varPropertyType, varPropertyValue)
    18.   MyDB.Properties.Append MyProperty
    19.   Resume Next
    20. Else
    21.   'Unknown Error
    22.   ChangeProperty = False
    23.   Resume Exit_ChangeProperty
    24. End If
    25. End Function
  2. In your Main Form's Open() Event, place the following code:
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Form_Open(Cancel As Integer)
    2. Dim intRetVal As Integer
    3.  
    4. 'Do NOT Allow the use of the SHIFT ByPass Key combination
    5. intRetVal = ChangeProperty("AllowBypassKey", dbBoolean, False)
    6. End Sub
  3. Save changes to the Database, then Exit.
  4. Open the Database, then immediately Close it again.
  5. From now on, you will not be able to hold down the SHIFT Key in order to Bypass the AutoExec Macro.
Jan 17 '08 #3
Dan2kx
365 Contributor
and is it possible to call the database window back up (if your logon details allow it) via code (and not have to exit and open again)

thanks for the help so far
Jan 17 '08 #4
ADezii
8,834 Recognized Expert Expert
and is it possible to call the database window back up (if your logon details allow it) via code (and not have to exit and open again)

thanks for the help so far
You can always bring the Database back up with the {F11} Key or Menus, unless, of course, you disallow these Options. Always test on a copy of the original DB.
Jan 17 '08 #5
Dan2kx
365 Contributor
Can i disable the F11 key (depending on my user status then?)

thanks
Jan 17 '08 #6
ADezii
8,834 Recognized Expert Expert
Can i disable the F11 key (depending on my user status then?)

thanks
You can effectively Enable/Disable the Use Special Access Keys on the Start Up ==> Advanced Options, but that would require Closing then Reopening the Database. You can disable the use of the F11 Key in the AutoKeys Macro, but that change would be Global, and to the best of my knowledge, cannot be assigned to individual Users depending on their Status. You can negate the effect of the F11 Key while a Form is Active by:
  1. Setting its KeyPreview Property = Yes.
  2. Copy and Paste the code below to the Form's KeyDown() Event:
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    2.   If KeyCode = vbKeyF11 Then
    3.     KeyCode = 0
    4.   End If
    5. End Sub
  3. The only problem with this approach is that it only applies to the specific Form, not other Forms unless the code and KeyPreview Property is duplicated, not other Objects opened by that Form as in: Queries, Reports, etc.

P.S. - My normal approach in similar cases is to:
  1. Disable the SHIFT By Pass.
  2. Disable Special Access Keys, Shortcut Menus, etc.
  3. Allow special Back-Door access which will Open the Start Up Dialog, Display the Database Window, etc.
Jan 18 '08 #7
Dan2kx
365 Contributor
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  2.   If KeyCode = vbKeyF11 Then
  3.     KeyCode = 0
  4.   End If
  5. End Sub
could i make that into a function and then only run the function on

Case "DBManager"
(x = blah blah) would that work anyhow?
P.S. - My normal approach in similar cases is to:
  1. Disable the SHIFT By Pass.
  2. Disable Special Access Keys, Shortcut Menus, etc.
  3. Allow special Back-Door access which will Open the Start Up Dialog, Display the Database Window, etc.
please explain the last bullet..

thank you!!!
Jan 18 '08 #8
ADezii
8,834 Recognized Expert Expert
could i make that into a function and then only run the function on

Case "DBManager"
(x = blah blah) would that work anyhow?


please explain the last bullet..

thank you!!!
I'll usually disable everything possible, then allow a specific Key Combination such as ALT+SHIFT+F7 in the AutoKeys Macro that will open the Start Up Properties Dialog Box. From there I can re-enable many Options that were previously disabled then eventually disable everything again.
Jan 18 '08 #9
Dan2kx
365 Contributor
The database will be used by many (from a network location) so is there a way to only allow the special keys if the user is an admin (i am using a custom logon process)??

thanks again
Jan 20 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

7
650
by: PerryC | last post by:
I have search googles and there are hundreds of tips about AllowByPassKey... however, none works for me... well, perhaps I am too new to such high level functionality that it just does not make sense to me. So, anyone please help. I have no idea what is "CreateProperty" that Access help was trying to tell me to do. Can anyone please write me a step by step on how to accomplish this? (i.e. disable Shift on Startup.) I've seen many...
3
2866
by: Nathan Bloom | last post by:
Hi, I was wondering if there was any way to disable certain menu items and toolbar icons at runtime using VBA? Particularly the delete icon on the tool bar and the delete option under edit. I want to force any record deletes to be performed through the database rather then allow deletes from the menu and toolbar options. If this is not possible is there a way to restrict table views without using the security features? There are...
1
4325
by: Ghulam | last post by:
I am using an Access 2k ADP (Converted into ADE) front end and SQL 2K on the backend. Although I taught pretty much myself into these concept with the help of some publications and users group posts, some time I would like to seek some specific help from fellow members. My Question is: Is there any way I can disable Shift Bypass key for regular Network users but enable that privilege to Network Administrator Groups? Our Network...
1
11321
by: cefrancke | last post by:
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
4
4181
by: Steve | last post by:
I have the MDI MFC application ported to .NET. Now this application include mixed managed/unmanaged code. The application displays progress dialog with the cancel button during lenghtly operation. This progress dialog implemented as modeless to allow user to cancel the lenghtly operation if he wishes. At the same time I disable mainframe window to prevent user from clicking on the menu bar. Here is the segment of the code:
12
2271
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation errors show up in your error-list, you can disable this functionality by selecting the Tools->Options menu item in VS or Visual Web Developer. Select the TextEditor->Html->Validation tree option in the left-hand side of the
3
5508
by: surya52 | last post by:
I want to disable right click in my application.Here are my requirements. 1. I don't what to turn off shift click for the page. I want to turn it off for specific links. 2. I want shift-click to be replaced with a regular click. Meaning, when the user shift-clicks the link they will be taken to the "HREF" within the current browser window and NOT open up a new window. I did find a script that does something close to what I want, but it...
3
4894
by: Joshua Ammann | last post by:
I've searched for this and haven't found the answer yet, so here goes. I'm using multiple versions of Access, all 2000 or later. Is there a command line switch that will produce the same result as opening the file in Windows while holding down the bypass (shift) key? I have GoToMyPC set up on a client's computer, and when accessing it through my Pocket PC I am unable to transmit the holding of the shift key while opening the database. If...
3
4136
by: zandiT | last post by:
hello i have a database that ive converted to an mde because its going on the network and will be accessd by various users. on the startup option i unticked all the options available so users wouldnt tamper with the underlying functionality of the database. my problem is when i hold down the shift key and open the database it opens the database window. you can't do anything to the forms but my main problem is there is no protection for the...
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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
10259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5354
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
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.