Spell check just current record?

kate10123

Registered User.
Local time
Today, 09:58
Joined
Jul 31, 2008
Messages
185
Hi there,

I have a database with a form to record tutorial notes. I have autocorrect on a memo box but users seem to use the general spell check button from the main menu then wonder why this goes through all the records and checks the spelling.

Is there a way to get the spell checker to just spell check the current or active record?

Alternatively, is it possible to code this as a separate spell check function?

Any advice appreciated.

Kate
 
This code will check one field on the current record only when exiting the field, without the user even having to invoke it:

Code:
Private Sub ControlToBeChecked_Exit(Cancel As Integer)

With Me!ControlToBeChecked
   
  If Len(.Value) > 0 Then
    DoCmd.SetWarnings False
    .SelStart = 1
    .SelLength = Len(.Value)
    DoCmd.RunCommand acCmdSpelling
     .SelLength = 0
    DoCmd.SetWarnings True
  End If

End With

End Sub
 
Linq,

Im having trouble with spell check checking all of the records in the recordset even though cycle is set to current record.
Is there another way to specify only that record with a button click (user wants it)
 
The Cycle Property set to Current Record has no effect on Spell Check. Are you wanting to check all fields in the current record or just one field?
 
This slight modification will do that, rainman89, substituting your actual control names for LimitedSpellCheckButton and ControlToBeChecked:
Code:
Private Sub LimitedSpellCheckButton_Click()

With Me!ControlToBeChecked
  
  Me!ControlToBeChecked.SetFocus
    
  If Len(.Value) > 0 Then
    DoCmd.SetWarnings False
    .SelStart = 1
    .SelLength = Len(.Value)
    DoCmd.RunCommand acCmdSpelling
     .SelLength = 0
    DoCmd.SetWarnings True
  End If

End With

End Sub
 
My client asked for spell-checking to be added on certain free-format fields and I was quietly squirming because I had no idea where to start. I bargained them down to what they REALLY needed, trying to buy time, not knowing where else to start.

Thank goodness for this forum, its contributors and the search facility. I've been able to under-promise and over-deliver; the solution above just works, in a fashion that users are used to. Why reinvent the wheel?

Thanks again.
 
HI, I am having some funky things going on with my spell checker. WHen users push the spell checker button it sometimes breaks all the botton's on the form and pops up with the following message "the expression On click you entered as the event property setting produced the following error: Object or class does not support the set of events". I believe it is something to do with the spell checker trying to go to other records. I am wanting it to only spell check 4 memo fields in the current record. Can this code be modified to do that? I want to see if that fix's the problem. At the moment my code for the buttons on this form is as follows:

Option Compare Database
Option Explicit
Private Sub cmdNoteComplete_Click()
Me.PNComplete = Now()
DoCmd.Close
End Sub
Private Sub cmdNoteIncomplete_Click()
Me.PNStarted = Now()
DoCmd.Close
End Sub
Private Sub Command37_Click()
DoCmd.RunCommand acCmdSpelling
End Sub

I hope someone can help. :)
 
missinglinq, you are my hero.
You dont know how many times your answers have helped me. Thanx and god bless you.
 
Glad we could help!

Also glad you searched, here, first...before posting a problem! So many people don't bother to!

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom