Brilliant Bill. Thanks.
Respectfully,
Liz Ravenwood
Programmer / Analyst
B/E Aerospace | Super First Class Environments
1851 S Pantano Road | Tucson, Arizona 85710
Office +1.520.239.4808 |
beaerospace.com
Passion to Innovate. Power to Deliver
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of wrmosca@comcast.net
Sent: Tuesday, November 26, 2013 1:53 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] RE: programmatically changing "enter" key behavior
Liz - As you have discovered those are not database-specific settings. Those are global settings.
The Enter in the text box is the easiest one. Every text box has a property Enter Key Behavior. The default is to tab out of the box. The other setting is New Line in Field. That's the one that adds the carriage return within the text.
The other Enter actions will need to be captured at the form level. Set the form's Key Preview to Yes. Then write this in the Form's KeyDown sub:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
KeyCode = 0
Beep
End If
End Sub
Regards,
Bill Mosca, Founder - MS_Access_Professionals
Microsoft Office Access MVP
My nothing-to-do-with-Access blog
---In MS_Access_Professionals@yahoogroups.com, <liz_ravenwood@beaerospace.com> wrote:
Pros, I have a db in which if I change the access/options/advanced enter key behavior to "none" the compiled front end does not inherit this property.
How can I programmatically make it so that when the user hits the enter key it doesn't move to the field nor does it move to the next record, nor does it add an "enter" character in the unbound text box?
Respectfully,
Liz Ravenwood
Programmer / Analyst
B/E Aerospace | Super First Class Environments
1851 S Pantano Road | Tucson, Arizona 85710
Office +1.520.239.4808 |
beaerospace.com
Passion to Innovate. Power to Deliver
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (6) |
Tidak ada komentar:
Posting Komentar