Dan Waters
dwaters at usinternet.com
Thu Apr 2 15:50:56 CDT 2009
Hmmmm. Try passing the textbox as a textbox instead of as a control. Mine
does work this way.
Dan
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Thursday, April 02, 2009 3:33 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Sel Start and Sel Length not working for me
Dan:
The code doesn't error. Just doesn't select the text. I put in some
MsgBoxes. Everything checks out. Just doesn't select the text.
Rocky
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Thursday, April 02, 2009 1:16 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Sel Start and Sel Length not working for me
Hi Rocky,
For spellchecking I do this, and it works every time.
txt.SelStart = 0
txt.SelLength = Len(txt.Text)
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
You might be having an issue with ctl, because I don't think that every
control has a length. Also, the + 1 on the length could be a problem too.
Which line does your code error out on?
Dan