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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|