473,445 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Disabling Shift Key to Show DB Window on Startup

365 100+
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 11160
Dököll
2,364 Expert 2GB
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 Expert 8TB
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 100+
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 Expert 8TB
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 100+
Can i disable the F11 key (depending on my user status then?)

thanks
Jan 17 '08 #6
ADezii
8,834 Expert 8TB
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 100+
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 Expert 8TB
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 100+
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
ADezii
8,834 Expert 8TB
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
To the best of my knowledge, yes it can be done, but NOT without Closing then Opening the Database again.
Jan 20 '08 #11
Dan2kx
365 100+
but that would open up the database for everyone yes??

is there code to show the db window that i could use?
Jan 20 '08 #12
ADezii
8,834 Expert 8TB
but that would open up the database for everyone yes??

is there code to show the db window that i could use?
is there code to show the db window that i could use?
You could use either of these 2 Methods:
Expand|Select|Wrap|Line Numbers
  1. 'Selects the Employees Table in the Database Window
  2. DoCmd.SelectObject acTable, "Employees", True
  3.  
  4. 'Opens Database Windows if F11 hasn't been disabled
  5. 'in the Forms KeyDown() Event
  6. SendKeys "{F11}"
  7.  
Jan 21 '08 #13
Dan2kx
365 100+
Is there anyway to reinstate every thing that has been disabled on startup (without having to restart)

my worry is upgrading the DB and creating specific queries when they are needed etc.

if i have to restart the app. it leaves room for someone else to access the BULK with out authorisation!!
Jan 21 '08 #14
ADezii
8,834 Expert 8TB
Is there anyway to reinstate every thing that has been disabled on startup (without having to restart)

my worry is upgrading the DB and creating specific queries when they are needed etc.

if i have to restart the app. it leaves room for someone else to access the BULK with out authorisation!!
To the best of my knowledge, to modify Properties like the ones listed below, requires a Close and Open of the DB:
Expand|Select|Wrap|Line Numbers
  1. StartUpShowDBWindow  
  2. StartUpShowStatusBar
  3. AllowShortcutMenus
  4. AllowFullMenus
  5. AllowBuiltInToolbars
  6. AllowToolbarChanges
  7. AllowSpecialKeys
Jan 21 '08 #15
Dan2kx
365 100+
i have an idea that might work, dont have time to test it just yet..

but i am going to create two macros that run either an On or Off function and then i am goin to edit the shortcut to the database using command line switches i will be able to run either the on or the off macro, which then runs the on or off function.

hopefully this will work,

i may even create this in a batch file (or an exe) so that the shortcut canneot be changed by anyone in the know (easily) then i could also hide the DB on a hidden network location

thanks for your time so far and i will let you know if i crack it as described..
Jan 22 '08 #16

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

Similar topics

7
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...
3
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...
1
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...
1
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...
4
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...
12
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...
3
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...
3
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...
3
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
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...
1
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...
0
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...
0
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,...
0
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...
0
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...

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.