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

Home Posts Topics Members FAQ

Disabling the <shift> + <enter>


I know that I saw some information concerning the <shift>+<enter>
combination use to bypass launching an Access mdb application and enter
the Access design workspace. Would someone please direct me to some
information on how to disable this function (and how to re-enable it)?
I believe that I saw some article that showed how to incorporate this
into a command button. That would work for me as I have three different
sign-on authorities for my application and I would only display the
command button for the 'admin' authority. Thanks, in advance, for your
help.

Sue
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
7 6671
Take a look here for code to manage the AllowByPassKey property.

http://www.mvps.org/access/general/gen0040.htm

- Jim

On 19 Aug 2004 19:13:36 GMT, Susan Bricker <sb****@att.net> wrote:

I know that I saw some information concerning the <shift>+<enter>
combination use to bypass launching an Access mdb application and enter
the Access design workspace. Would someone please direct me to some
information on how to disable this function (and how to re-enable it)?
I believe that I saw some article that showed how to incorporate this
into a command button. That would work for me as I have three different
sign-on authorities for my application and I would only display the
command button for the 'admin' authority. Thanks, in advance, for your
help.

Sue
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #2
I have just managed to accomplish this very thing.
Paste the following code into a new module:

Function ChangeProperty(strPropName As String, varPropType As Variant,
varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
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

You then need to create two command buttons, one to disable the shift key,
the other to enable it.

Disable:
Private Sub diable_Click()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, False
End Sub

Enable:
Private Sub enable_Click()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, True
End Sub

Hope this helps,

Mark
"Susan Bricker" <sb****@att.net> wrote in message
news:41**********************@news.newsgroups.ws.. .

I know that I saw some information concerning the <shift>+<enter>
combination use to bypass launching an Access mdb application and enter
the Access design workspace. Would someone please direct me to some
information on how to disable this function (and how to re-enable it)?
I believe that I saw some article that showed how to incorporate this
into a command button. That would work for me as I have three different
sign-on authorities for my application and I would only display the
command button for the 'admin' authority. Thanks, in advance, for your
help.

Sue
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #3

Mark,

Great info. Thanks. One question, though? Why did you create
"ChangeProperty" as a function and not as a sub? I see you are passing
it some arguments. But what is the purpose of setting a return code
value? Thanks, again.

Sue

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4
To give some of you a laugh, I'll be honest. I'm not a programmer and have
no idea what you are on about. The example I gave was found on the net by
trawling through the access sites. Maybe one of the more experienced on
here could give you the reason why the code is the way it is.

Regards,

Mark
"Susan Bricker" <sb****@att.net> wrote in message
news:41**********************@news.newsgroups.ws.. .

Mark,

Great info. Thanks. One question, though? Why did you create
"ChangeProperty" as a function and not as a sub? I see you are passing
it some arguments. But what is the purpose of setting a return code
value? Thanks, again.

Sue

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #5
When the function succeeds it returns True. When it fails it returns
False. So the calling routine will "know" to do something, depending on
the return value.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Mark R wrote:
To give some of you a laugh, I'll be honest. I'm not a programmer and have
no idea what you are on about. The example I gave was found on the net by
trawling through the access sites. Maybe one of the more experienced on
here could give you the reason why the code is the way it is.

Regards,

Mark
"Susan Bricker" <sb****@att.net> wrote in message
news:41**********************@news.newsgroups.ws.. .
Mark,

Great info. Thanks. One question, though? Why did you create
"ChangeProperty" as a function and not as a sub? I see you are passing
it some arguments. But what is the purpose of setting a return code
value? Thanks, again.

Sue

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Nov 13 '05 #6
Sue

MGFoster,

Thanks for replying. I totally understand about function return codes
(I've been programming for quite a few years). My question was not that
clear ... it should have read ... Why use a function (and not a sub)
with a return code if you are not going to test the return code? I
don't believe that there was a test of the return code from
ChangeProperty. Thanks.

Sue
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #7
As Mark said he's not a programmer and so maybe didn't realise why there was
a return code there.

As you know he could have done something like

if Not ChangeProperty("AllowBypassKey", DB_Boolean, False) then
Msgbox "Allow bypass key may still be enabled"
end if
Having said that the version on the Access Web posted earlier is better as
it uses the DDL setting.
--
Terry Kreft
MVP Microsoft Access
"Sue" <sl*******@yahoo.com> wrote in message
news:41**********************@news.newsgroups.ws.. .

MGFoster,

Thanks for replying. I totally understand about function return codes
(I've been programming for quite a few years). My question was not that
clear ... it should have read ... Why use a function (and not a sub)
with a return code if you are not going to test the return code? I
don't believe that there was a test of the return code from
ChangeProperty. Thanks.

Sue
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #8

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

Similar topics

2
by: VK | last post by:
A while ago there was a discussion how to implement a select list that would call a function right upon new selection is being made w/o clicking any additional buttons: ...
6
by: tor | last post by:
Hello How can I use an other key then TAB to move from one textBox to another?? Torfinn
1
by: | last post by:
When you hit the Enter key in VS.NET, it assumes you want to use a paragragh's "<P></P>" tags. It's a little annoying to go to the HTML view whenever I need to change <P> to <BR> to get more...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: nishac | last post by:
I am using fckeditor 2.3.The problem is that i use shift-enter between paragraphs.But when i see it in the browser I can see double space instead of single space. I noticed that the source of...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
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
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...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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...

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.