auto selecting text using selstart, sellength

B

Brad Pears

I have two Access 2000 projects... One is here at work where I am using
".selstart" and ".sellength" to automatically select the text within a
textbox in the "gotfocus"' event... It works just fine...

The other project is one I am working on at home (doing some side work). I
want to use this same functionality as the first project. However, it does
not work at all. I specify the .selstart and .sellength properties and when
the control has focus, no text is selected....

I must be missing one simple step. Is there a setting for the control that
enables text to be selected or not selected? I could not find anything...

Please help!!!

Thanks,

Brad
 
T

TC

Are you sure that you are actually excuting the code? Add a msgbox, to
be certain.

Sometimes the event procedures can get disconnected from the actual
events. Or you might have changed the name of the control, but
forgotten to rename the procedure (or that has disconnected it).

To reconnect any naughty disconnected event procedures, just select the
whole text of the form module, then ctrl-x to cut, ctrl-v to paste,
recompile (optional), save, & try again.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top