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 Memo Code NOT Working, Need Help
Cant seem to make this code work. It just gives me the message Spell check
is not available for this item It is on a Memo field. On Error Resume Next Dim ctlSpell As Control ' Check the spelling in the selected text box Set ctlSpell = Screen.PreviousControl If TypeOf ctlSpell Is TextBox Then If IsNull(Len(ctlSpell)) Or Len(ctlSpell) = 0 Then MsgBox "There is nothing to spell check." ctlSpell.SetFocus Exit Sub End If With ctlSpell .SetFocus .SelStart = 0 .SelLength = Len(ctlSpell) End With DoCmd.RunCommand acCmdSpelling Else MsgBox "Spell check is not available for this item." End If ctlSpell.SetFocus |
#2
|
|||
|
|||
Spell Check Memo Code NOT Working, Need Help
Works fine here ...
|
#3
|
|||
|
|||
Spell Check Memo Code NOT Working, Need Help
"Dave Elliott" wrote in message
m... Cant seem to make this code work. It just gives me the message Spell check is not available for this item It is on a Memo field. On Error Resume Next Dim ctlSpell As Control ' Check the spelling in the selected text box Set ctlSpell = Screen.PreviousControl If TypeOf ctlSpell Is TextBox Then If IsNull(Len(ctlSpell)) Or Len(ctlSpell) = 0 Then MsgBox "There is nothing to spell check." ctlSpell.SetFocus Exit Sub End If With ctlSpell .SetFocus .SelStart = 0 .SelLength = Len(ctlSpell) End With DoCmd.RunCommand acCmdSpelling Else MsgBox "Spell check is not available for this item." End If ctlSpell.SetFocus How are you triggering this code? What event is it in, and what control is that event attached to? -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup, not by e-mail) |
#4
|
|||
|
|||
Spell Check Memo Code NOT Working, Need Help
It is being triggered using the Double Click Event. The field is a memo
field and the name of the control is Job and actual control name is Job Description. "Dirk Goldgar" wrote in message ... "Dave Elliott" wrote in message m... Cant seem to make this code work. It just gives me the message Spell check is not available for this item It is on a Memo field. On Error Resume Next Dim ctlSpell As Control ' Check the spelling in the selected text box Set ctlSpell = Screen.PreviousControl If TypeOf ctlSpell Is TextBox Then If IsNull(Len(ctlSpell)) Or Len(ctlSpell) = 0 Then MsgBox "There is nothing to spell check." ctlSpell.SetFocus Exit Sub End If With ctlSpell .SetFocus .SelStart = 0 .SelLength = Len(ctlSpell) End With DoCmd.RunCommand acCmdSpelling Else MsgBox "Spell check is not available for this item." End If ctlSpell.SetFocus How are you triggering this code? What event is it in, and what control is that event attached to? -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup, not by e-mail) |
#5
|
|||
|
|||
Spell Check Memo Code NOT Working, Need Help
"Dave Elliott" wrote in message
... It is being triggered using the Double Click Event. The field is a memo field and the name of the control is Job and actual control name is Job Description. The DblClick event of what? Of the text box itself? Reading it over, it looks to me like that code is meant to be executed from some other control, like the Click event of a command button. It's trying to spell-check the control that *previously* had the focus. I don't know what you mean by "the name of the control is Job and actual control name is Job Description", but I guess you mean that the control is named "Job" and it's bound to a field named "Job Description". If that is the case, try this modification of the code: '----- start of revised code ----- Private Sub Job_DblClick(Cancel As Integer) On Error GoTo Err_Handler Dim ctlSpell As Control ' Check the spelling in the selected text box With Me!Job If Len(.Value & vbNullString) = 0 Then MsgBox "There is nothing to spell check." Else .SelStart = 0 .SelLength = Len(ctlSpell) DoCmd.RunCommand acCmdSpelling End If End With Exit_Point: Exit Sub Err_Handler: MsgBox Err.Description, vbExclamation, "Error " & Err.Number Resume Exit_Point End Sub '----- end of revised code ----- If I've got the name of the control wrong, then you need to change the name of the procedure and the "With Me!Job" line. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup, not by e-mail) |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Spell Check | Freddie Newsgroup | General Discussion | 3 | June 22nd, 2004 11:39 PM |
Outlook express & spell check | [email protected] | Outlook Express | 1 | June 11th, 2004 10:58 AM |
Spell Check language change problem | Jackie | General Discussion | 3 | June 10th, 2004 10:25 AM |
Spell Check will not work! | Marshy | General Discussion | 1 | June 7th, 2004 11:10 AM |
using spell check on a protected sheet | Scott | Worksheet Functions | 0 | September 17th, 2003 06:19 PM |