Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Prevent move next on Enter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jesper Fj?lner - 13 Apr 2005 16:43 GMT
I'm using the folto prevent users from 'tabbing' out of a field.

Private Sub ControlName_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyTab And Shift = 0 Then
   KeyCode = 0
End If
End Sub

Can I do the same for the Enter-button?
If KeyCode = vbKeyReturn Then
   KeyCode =0
End if
doesn't seem to work?

In the database options I've set the database to move to the next field on
Enter - does this complicate it?
Could it be something with the previewing of the keystrokes in field/form?
Thanks for your help.

Signature

Jesper Fj?lner
Denmark

Jesper Fj?lner - 13 Apr 2005 20:33 GMT
> Can I do the same for the Enter-button?
> If KeyCode = vbKeyReturn Then
>     KeyCode =0
> End if
> doesn't seem to work?

Got it working with
If KeyCode = 13 Then
   KeyCode =0
End if
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.