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
---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
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar