Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 11th, 2006, 02:02 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default Move focus to field without selecting text

Here is an intersting one for you...

I need to move focus to a text field on a form, and then put the cursor at the beginning of the field, so that the user can enter something before what already occurs in the field. Currently, the entire field is highlighted.

Thanks

Mike

Mike
EchoVue.com
__________________
Mike
EchoVue.com
  #2 (permalink)  
Old April 12th, 2006, 01:52 AM
Authorized User
 
Join Date: Mar 2006
Location: Bratislava, , Slovakia.
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
you have two alternatives:
first: Menu Tools -> Options, then Keyboard Tab, check "Behavior entering field" to "go to start of field"
second: use "Enter" Event on every field that should have this behaviour

e.g.
Private Sub Field1_Enter()
  Me.Field1.SelStart = 0
End Sub

Peko



Similar Threads
Thread Thread Starter Forum Replies Last Post
Move next input field automatically javaean Java Basics 3 November 16th, 2007 09:27 AM
insert text into a text box by selecting an link gavmc Other Programming Languages 0 February 15th, 2006 09:46 AM
Focus on a text input field fizzerchris Classic ASP Basics 0 December 16th, 2005 09:20 PM
Move focus from Cell echovue Excel VBA 2 April 12th, 2005 09:38 AM
calculate value on Lost Focus of text field creative_eye General .NET 1 April 12th, 2004 08:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.