Re: Performing a spell check on the contents of a userform field
Hi to everyone above, and anyone else looking for an answer to this.
Here's another option you can try, which I alighted on after experimenting with some of the above suggestions, when wanting to add a spell check feature to an Access 2010 form field:
* from design view in the form concerned, right-click in the field you want to spell-check
* choose:
Properties - to display the property sheet if it's not already on display. (If it is this will turn it off!)
* in the Property sheet, click the
Event tab
* for the
On Dbl Click event, click the three dots at the far right of that row
* enter this code, between the "Private Sub..." and "End Sub" lines now created for the event:
' DoCmd.SetWarnings False ' optional; remove the first ' in this line and its counterpart below if you want to use them
DoCmd.RunCommand acCmdSpelling
' DoCmd.SetWarnings True ' optional; remove the first ' in this line and its counterpart above if you want to use them
' Msgbox "Spelling checked" ' remove the first ' in this line, if you use the SetWarnings lines above
Return to normal Form view for your form. If you now double-click within the relevant form field, the spelling will be checked. If you wish you could add a text label alongside or above the field, e.g. "Double-click within this field to spell-check it".