It worked perfectly
"Dirk Goldgar" <dgNOdataSPAMgnostics.com> wrote in message
news:uhE8mjKRDHA.2460TK2MSFTNGP10.phx.gbl...> "Berny" <BlancoB at msn Dot com> wrote in message
> news:%23Sxk3bKRDHA.3192TK2MSFTNGP10.phx.gbl>> > I have a similar problem
> > When I tab into a field in a form it selects all of the text, if you
> > begin to type you replace all the existing text.
> > I know I can change the database options to start at the beginning of
> > the field, but this changes all fields and databases to this default.
> > I only need the cursor to start at the beginning of only a couple of
> > fields.
> > Can this be done?
> > If so, any direction would be greatly appreciated.
> Paste this function into a standard module (not the form's module):
> '----- start of code -----
> Public Function UnselectText()
> On Error Resume Next
> Screen.ActiveControl.SelLength = 0
> End Function
> '----- end of code -----
> Then, for each of the text boxes you want to behave as you describe, set
> the control's OnEnter property setting (directly on the Event tab of the
> property sheet) to this:
> That ought to do it.
> Dirk Goldgar, MS Access MVP
> (please reply to the newsgroup)