473,386 Members | 1,621 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,386 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 2322
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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,...

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.