473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

where to write shiftkey disable code

sir,
now when i open the database tools menu is not coming.i want that only.
but if i open my database by pressing shift button tools menu is coming.i have a code to disable the shift key
where i have to write the code.
where is the database property allowbypassshiftkey.i didnt find that
where i have to write the shiftkey disable code
May 20 '07 #1
7 2319
ADezii
8,834 Expert 8TB
sir,
now when i open the database tools menu is not coming.i want that only.
but if i open my database by pressing shift button tools menu is coming.i have a code to disable the shift key
where i have to write the code.
where is the database property allowbypassshiftkey.i didnt find that
where i have to write the shiftkey disable code
I use the code frequently but I am at work and do not have it handy. I'll post it for you early this evening unless someone beats me to the punch.
May 20 '07 #2
ADezii
8,834 Expert 8TB
sir,
now when i open the database tools menu is not coming.i want that only.
but if i open my database by pressing shift button tools menu is coming.i have a code to disable the shift key
where i have to write the code.
where is the database property allowbypassshiftkey.i didnt find that
where i have to write the shiftkey disable code
Expand|Select|Wrap|Line Numbers
  1. Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
  2.    Dim dbs As Object, prp As Variant
  3.    Const conPropNotFoundError = 3270
  4.  
  5.    Set dbs = CurrentDb
  6.    On Error GoTo Change_Err
  7.    dbs.Properties(strPropName) = varPropValue
  8.    ChangeProperty = True
  9.  
  10. Change_Bye:
  11.    Exit Function
  12.  
  13. Change_Err:
  14.    If Err = conPropNotFoundError Then    ' Property not found.
  15.        Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
  16.        dbs.Properties.Append prp
  17.        Resume Next
  18.    Else
  19.        ' Unknown error.
  20.        ChangeProperty = False
  21.        Resume Change_Bye
  22.    End If
  23. End Function
To call the Function:
Expand|Select|Wrap|Line Numbers
  1. Const DB_Boolean As Long = 1
  2. 'To allow the SHIFT Key By By-Pass
  3. ChangeProperty "AllowBypassKey", DB_Boolean, True
May 20 '07 #3
sir
i know the code.
but where we have to write that code in modules or where
i am not getting
please help me
May 21 '07 #4
ADezii
8,834 Expert 8TB
sir
i know the code.
but where we have to write that code in modules or where
i am not getting
please help me
You can place the code in the Open() Event of your Main Form. The next time you Open your Database, the change will have taken effect. Be sure you allow yourself a 'Backdoor' into the Database.
May 21 '07 #5
jamjar
50
You can place the code in the Open() Event of your Main Form. The next time you Open your Database, the change will have taken effect. Be sure you allow yourself a 'Backdoor' into the Database.
Thanks - I've been wondering how you do this. Three questions:

  1. How does this run if holding the shift key down prevents the main form from opening?
  2. How do you set a backdoor?
  3. Is there any way to re-establish the full menus once the db is opened?
I guess - depending if the backdoor has to be activated at startup or can be done later - questions 2 and 3 are related.



James
May 23 '07 #6
Sub DisableShiftKey()

Dim db As DAO.Database
Dim prp As DAO.Property

Set db = CurrentDb
db.Properties.Delete "AllowBypassKey"
Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False, True)
db.Properties.Append prp

db.Properties.Refresh

Set prp = Nothing
Set db = Nothing

End Sub
i wrote this code in the start up form on open event.but it is not working
what to do
please help me.when i convert to mde format tables r opening.iwant tables sholu not open.is there any way.
May 23 '07 #7
ADezii
8,834 Expert 8TB
Thanks - I've been wondering how you do this. Three questions:

  1. How does this run if holding the shift key down prevents the main form from opening?
  2. How do you set a backdoor?
  3. Is there any way to re-establish the full menus once the db is opened?
I guess - depending if the backdoor has to be activated at startup or can be done later - questions 2 and 3 are related.



James
For some Databases, I'll disable the SHIFT ByPass and also deselect all Options in Tools ==> StartUp among other things. To get back in to the Database, I'll create an AutoKeys Macro with a complex Shortcut Key combination which will execute RunCommand ==> StartUp Properties. I will then select all Options and open the Database again to allow full access.
May 23 '07 #8

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

Similar topics

5
by: Bob Bedford | last post by:
I create checkboxes using datas from a database (with PHP). I store all values in an array, as I must pass this value like a Form value. Now, in some cases, when a checkbox is selected, I must...
13
by: jing | last post by:
hi all. i need to compile a sourcecode package in c++ download from an edu. site. here is what has happened #make all cd generate; make make: Entering directory `/home/dpr/generate' g++ -c -O3...
1
by: Carl Gilbert | last post by:
Hi Is there any way to enable/disable an item in a property grid at runtime? I have two properties that I am showin in a property gris and based on the validity of the first property, I want...
4
by: Chris | last post by:
I have an asp.net page say page1.aspx. The form in html code is <form id = "Form1"> And i want to disable all the fields of the form after some code steps. I had created a javascript funct: ...
13
by: John Salerno | last post by:
The code to look at is the try statement in the NumbersValidator class, just a few lines down. Is this a clean way to write it? i.e. is it okay to have all those return statements? Is this a good...
20
by: Newbie Coder | last post by:
MFC Application VC++.NET 2003 I have a certain registry key (HKCU\Software\MyKey) that contains between 30 & 64 string values I need to write a '*' to all those 30 - 64 string values under...
8
by: freeskier | last post by:
I have been using the following code to cycle through a subform and disable all textboxes on a form. If a textbox on the form has the focus when this is run I get error "can't disable a control when...
9
by: rakeshvthu | last post by:
hi all, we have a requirement to disable shift click and ctrl click. i have code: document.onmousedown = shiftEnter; function shiftEnter(e) { if (event.shiftKey) {
16
by: nagmvs | last post by:
Hi, Can any one tell me How to disable Keyboard Functions using JavaScript.If knows please tell me the code.Also tell me the code for mouse disable also. Thanks, Nagesh.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.