Click here to Skip to main content
15,867,704 members
Articles / Programming Languages / Visual Basic 6
Tip/Trick

Spell checking in Microsoft Access 2003 applications

Rate me:
Please Sign up or sign in to vote.
4.85/5 (22 votes)
22 Sep 2012CPOL 31K   274   19   3
An easy way to do spell checking in Microsoft Access 2003 applications.

Introduction

Here is an easy way to do spell checking in an MS Access 2003 application.

Background

For various automation type applications, Microsoft Access is widely used for database and user interface design. In this article, I would like to show you how to do spell checking in Microsoft Access 2003 applications.

Using the code

This is a very simple way. I just use the acCmdSpelling command. The command performs spell checking on the currently focused text control. A code example is given below:

VB
Private Sub btnSpellChecker_Click()
On Error GoTo Err:
    
    With Me.txtMessage
    .SetFocus
        If Len(.Text & vbNullString) > 0 Then
            .SelStart = 0
            .SelLength = Len(.Text)
            DoCmd.RunCommand acCmdSpelling
        End If
    End With
    
Exit Sub

Err:
    'Err.Raise Err.Number, Err.Source, Err.Description
     MsgBox Err.Description
End Sub

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions

 
GeneralMy vote of 5 Pin
vbianx15-Apr-12 23:30
vbianx15-Apr-12 23:30 
GeneralRe: My vote of 5 Pin
Md. Marufuzzaman16-Apr-12 6:42
professionalMd. Marufuzzaman16-Apr-12 6:42 
GeneralMy vote of 3 Pin
i0011-Oct-11 13:42
i0011-Oct-11 13:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.