A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Change Default [Enter] key behavior



 
 
Thread Tools Display Modes
  #1  
Old June 5th, 2004, 05:40 PM
Paul Johnson
external usenet poster
 
Posts: n/a
Default Change Default [Enter] key behavior

In the Access Tools/Options menu, under the Keyboard tab, I have selected
the "Don't Move" option in the "Move after Enter" option box. This is the
desired setting for the main form in my current application, but these are
user-defined settings for the Access environment, not specific to a database
file. Is there a way to set this property in code?

I thought it might be the DoCmd.DoMenuItem, but I don't see how to get to
the tab and property.

Any help is appreciated.

Paul Johnson
Alexandria, VA


  #2  
Old June 7th, 2004, 10:15 PM
Eric Butts [MSFT]
external usenet poster
 
Posts: n/a
Default Change Default [Enter] key behavior

Hi Paul,

Try the following:

- Create a public variable behing your Form
Dim KeyInt As Integer

- For the KeyDown event of your textbox control add the following
If KeyCode = vbKeyReturn Then
KeyInt = vbKeyReturn
End If

- For the Exit event of your textbox control add the following
If KeyInt = vbKeyReturn Then
Cancel = True
End If


I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or
to visit Windows Update at http://windowsupdate.microsoft.com/ to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights


--------------------
| From: "Paul Johnson"
| Subject: Change Default [Enter] key behavior
| Date: Sat, 5 Jun 2004 12:40:48 -0400
| Lines: 15
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID:
| Newsgroups: microsoft.public.access.forms
| NNTP-Posting-Host: pool-151-200-49-41.res.east.verizon.net 151.200.49.41
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.access.forms:268863
| X-Tomcat-NG: microsoft.public.access.forms
|
| In the Access Tools/Options menu, under the Keyboard tab, I have selected
| the "Don't Move" option in the "Move after Enter" option box. This is the
| desired setting for the main form in my current application, but these are
| user-defined settings for the Access environment, not specific to a
database
| file. Is there a way to set this property in code?
|
| I thought it might be the DoCmd.DoMenuItem, but I don't see how to get to
| the tab and property.
|
| Any help is appreciated.
|
| Paul Johnson
| Alexandria, VA
|
|
|

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.