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  

"Enter key" default



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2010, 12:37 AM posted to microsoft.public.access.forms
Bill
external usenet poster
 
Posts: 330
Default "Enter key" default

The A2003 default on forms when the enter
key is pressed following entry of text in a
text box is to clear the field, or at least it
appears to be the default. Where's the
setting where the enter key would otherwise
be the equivalent of pressing the tab key
or moving the focus with the mouse.......
something other than clearing what was
just typed.

Thanks,
Bill


Ads
  #2  
Old May 26th, 2010, 03:59 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default "Enter key" default

On the text box's property dialog, on the 'other' tab, look for Enter Key
Behavior.
You have a choice of Default or New Line in Field.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Bill" wrote in message
...
The A2003 default on forms when the enter
key is pressed following entry of text in a
text box is to clear the field, or at least it
appears to be the default. Where's the
setting where the enter key would otherwise
be the equivalent of pressing the tab key
or moving the focus with the mouse.......
something other than clearing what was
just typed.

Thanks,
Bill



  #3  
Old May 26th, 2010, 06:51 AM posted to microsoft.public.access.forms
Bill
external usenet poster
 
Posts: 330
Default "Enter key" default

Jeanette,
I guess my question is how to change the default. I didn't
want to necessarily change all the text boxes on the form
individually.
Bill
California, USA

"Jeanette Cunningham" wrote in message
...
On the text box's property dialog, on the 'other' tab, look for Enter Key
Behavior.
You have a choice of Default or New Line in Field.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Bill" wrote in message
...
The A2003 default on forms when the enter
key is pressed following entry of text in a
text box is to clear the field, or at least it
appears to be the default. Where's the
setting where the enter key would otherwise
be the equivalent of pressing the tab key
or moving the focus with the mouse.......
something other than clearing what was
just typed.

Thanks,
Bill





  #4  
Old May 26th, 2010, 07:49 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default "Enter key" default

Here is some code that will do that.

-------------
Public Function ChangeSomethingOnControl()
Dim aob As AccessObject
Dim frm As Form
Dim ctl As control

' Ignore any errors
On Error Resume Next
' Loop through all the forms
For Each aob In CurrentProject.AllForms
' Open the form in Design view, but hidden
DoCmd.OpenForm aob.Name, acDesign, , , , acHidden
' Point to the form
Set frm = Forms(aob.Name)
' Loop through all controls
For Each ctl In frm.Controls
If TypeOf ctl Is TextBox Then
ctl.Properties("EnterKeyBehavior") = False 'default
End If

Next ctl
' Clear the control object
Set ctl = Nothing
' Close and save any changes
DoCmd.Close acForm, aob.Name, acSaveNo
Next aob
' Clear the Access object
Set aob = Nothing
' .. and the Form object
Set frm = Nothing
MsgBox "Done"
End Function
------------------

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Bill" wrote in message
...
Jeanette,
I guess my question is how to change the default. I didn't
want to necessarily change all the text boxes on the form
individually.
Bill
California, USA

"Jeanette Cunningham" wrote in message
...
On the text box's property dialog, on the 'other' tab, look for Enter Key
Behavior.
You have a choice of Default or New Line in Field.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Bill" wrote in message
...
The A2003 default on forms when the enter
key is pressed following entry of text in a
text box is to clear the field, or at least it
appears to be the default. Where's the
setting where the enter key would otherwise
be the equivalent of pressing the tab key
or moving the focus with the mouse.......
something other than clearing what was
just typed.

Thanks,
Bill







 




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 11:17 PM.


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