473,378 Members | 1,067 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,378 software developers and data experts.

Disallow Bypass Key and Code

Perhaps someone knows how to structure the correct VBA code to use for
allowing or disallowing use of the bypass key, because the code that I
used as suggested by MSAccess 97 has failed to work. A copy of the
same is pasted below. Any assistance will be appreciated. Thanks,
Dalan

Sub SetStartupProperties()

ChangeProperty "StartupShowDBWindow", dbBoolean, True
ChangeProperty "AllowSpecialKeys", dbBoolean, True
ChangeProperty "AllowBypassKey", dbBoolean, False

End Sub
Function ChangeProperty(strPropName As String, varPropType As Variant,
varPropValue As Variant) As Integer
Dim dbs As Database, prp As Property
Const conPropNotFoundError = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, varPropType,
varPropValue)
dbs.Properties.Append prp

Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
Nov 12 '05 #1
3 4016
"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
Perhaps someone knows how to structure the correct VBA code to use for
allowing or disallowing use of the bypass key, because the code that I
used as suggested by MSAccess 97 has failed to work. [snip]


Failed to work how? The property changed don't have an effect on the
current session, but should be in effect if you close and reopen the file.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #2
"Rick Brandt" <ri*********@hotmail.com> wrote in message news:<bp*************@ID-98015.news.uni-berlin.de>...
"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
Perhaps someone knows how to structure the correct VBA code to use for
allowing or disallowing use of the bypass key, because the code that I
used as suggested by MSAccess 97 has failed to work. [snip]


Failed to work how? The property changed don't have an effect on the
current session, but should be in effect if you close and reopen the file.


Simply, after exiting the database and then restarting it by holding
the Shift key down, the database window is shown (several tries). I
had presumed that by not allowing the Shift key to be functional that
it would not permit this, but seemingly, it has no effect. So maybe
someone knows of a workaround for this issue, or a better piece of
code. Thanks.
Nov 12 '05 #3
Dalan previously wrote:
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:<bp*************@ID-98015.news.uni-berlin.de>...
"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
Perhaps someone knows how to structure the correct VBA code to use
for
allowing or disallowing use of the bypass key, because the code
that I
used as suggested by MSAccess 97 has failed to work. [snip]


Failed to work how? The property changed don't have an effect on the
current session, but should be in effect if you close and reopen the
file.


Simply, after exiting the database and then restarting it by holding
the Shift key down, the database window is shown (several tries). I
had presumed that by not allowing the Shift key to be functional that
it would not permit this, but seemingly, it has no effect. So maybe
someone knows of a workaround for this issue, or a better piece of
code. Thanks.


The code looks OK to me.
How are you running kit?

However, before running this you must provide yourself with a reset
procedure. You would normally run the reset from another mdb file.

Regards

Peter Russell


Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alex Vinokur | last post by:
========================================= Windows 2000 CYGWIN_NT-5.0 1.3.22(0.78/3/2) GNU gcc version 3.2 20020927 (prerelease) ========================================= Here is some program...
2
by: socialism001 | last post by:
I have a folder that I want googlebot to index but I don't want any other bots to be able to index the files. How would I do this in the ..robots file. Thanks, Chris
1
by: Dalan | last post by:
I have learn that there is another option for setting the allow bypass key other than through a module (for Access 97), and that it is through use of a dll. Obviously, it is fairly easy to...
3
by: tdmailbox | last post by:
I set up my code to disable the shift bypass however for certain users I want to allow them through a button no a form to be able open up the list of tablies and queries. Is there a vb command...
0
by: EgoSum | last post by:
Can someone help me with custom text box? I want change behavior custom date text box - disallow entry and pass entry from numeric keyboard to a text box. Code below disallow entry, but how I can...
2
by: EgoSum | last post by:
Can someone help me with custom text box? I want change behavior custom date text box - disallow entry and pass entry from numeric keyboard to a text box. Code below disallow entry, but how I can...
3
by: CanuckChuck | last post by:
I have a code for enabling a command button to password protect the enabling/disabling of the Shift bypass. For some reason though I keep recieving a syntax error when I try to use it. I copied the...
1
by: OlaPihl | last post by:
Hi, How can I by code enable and disable "Bypass proxy server for local adresses" in Internet Explorer / Tools / Internet Options / Connections / LAN Settings. I have made a program (VB.Net)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.