SubForm memo field - Spell Check

evictme

Registered User.
Local time
Today, 09:52
Joined
May 18, 2011
Messages
168
Hello All,

Back again with a new problem I hope you can help me with:

I have a Form that has onload event LockBoundControls with a subform for notes.

I am trying to add spell check feature to the notes field in the subform, which is a memo field, but I keep getting the error message:

2046: command or action Spelling isnt available now

Here is the code I am trying in the OnExit event field:

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

Any help would be greatly appreciated.

Form [Client] Subform [ClientNotes] linked by [ClientID]
 
A Subform is a Control on the Main Form...so if LockBoundControls does what it says...i.e. locks all Bound Controls...the Subform is Locked and you could neither enter data nor Spell Check it.

You'd need to lock all Controls except the Subform Control to do this...unless I'm misinterpreting your scenario.

Linq ;0)>
 
I understand that. I have a button that locks/unlocks the form. Essentially what happens is the form loads, locked, the user unlocks to edit (including the subform) and theyre good to go.

Despite being unlocked and the subform allowing for edits I am unable to get the code to work. It just wont allow for spelling. Whats interesting is that if I move the cursor to a field in the Form Access will provide the option to spell check in the menu bar but not in that field.

What am i missing here?
 
The fileds in question were set to Plain Text and have now changed them to Rich Text but despite this the cmdSpelling option is not available for the field.

Any help would be greatly appreciated.
 
think you need to select the text for accmdspelling to work

investigate the selstart and sellength properties to do this with vba
 
what code do you have to lock the bound controls and the subform?
 

Users who are viewing this thread

Back
Top Bottom