A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Spell Check Help



 
 
Thread Tools Display Modes
  #1  
Old November 19th, 2009, 07:21 PM posted to microsoft.public.access.forms
bladelock
external usenet poster
 
Posts: 37
Default Spell Check Help

Good Day,
I have this code in my text box that accepts text (memo):

If Len(Me!CASEFACTS & "") 0 Then
DoCmd.RunCommand acCmdSpelling
Else
Exit Sub
End If

The only problem I'm having with spell check is that it checks the whole
form. I just want to spell check only the textbox that the code is in. Is
this possible?
  #2  
Old November 19th, 2009, 09:33 PM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Spell Check Help

bladelock,

That is an issue, so I use the one below. I added the line * If
ctlSpell.BackColor = 15400959 Then* so that any box on a form I want spell
checked I tint that color and it only checks that one. Using a button, you
can activate with

Private Sub cmdSpellCheck_Click()
Call Spell
End Sub


'***Start of Code
Public Function Spell()
' Arvin Meyer 9/17/1998
' Adapted from code by Terry Wickenden
Dim ctlSpell As Control
Dim frm As Form
Set frm = Screen.ActiveForm
DoCmd.SetWarnings False
' Enumerate Controls collection.
For Each ctlSpell In frm.Controls
If TypeOf ctlSpell Is TextBox Then
If ctlSpell.BackColor = 15400959 Then
If Len(ctlSpell) 0 Then
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunCommand acCmdSpelling
End If
End If
End If
Next
DoCmd.SetWarnings True
End Function
'**End of Code

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"bladelock" wrote in message
...
Good Day,
I have this code in my text box that accepts text (memo):

If Len(Me!CASEFACTS & "") 0 Then
DoCmd.RunCommand acCmdSpelling
Else
Exit Sub
End If

The only problem I'm having with spell check is that it checks the whole
form. I just want to spell check only the textbox that the code is in. Is
this possible?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.