Spell Checker problem

Stitcho

Registered User.
Local time
Today, 07:36
Joined
Feb 7, 2008
Messages
38
Hi firstly I want to say I am not a programmer or anything like that, I know enough about Access to get me by with simple things but after that i get a little stuck so please dont baffle me with loads of technical coding terms :D

Ok..I have a database with a form where the users enter a subject and description. I have a spell checker running on these 2 fields which works fine up to a certain point. If the users goes in, adds a new record, tabs off the field, the spell checker runs, etc then it works fine. If the user then creates a new record and it picks up a spelling mistake in the new record it jumps back to the previous record that was created and spell checks that again.

If you close the form and open it again before creating the second record it is fine. Could anyone possible shed any light on the situation? Below is the code that I am using (found it on the internet somewhere)


Code:
Private Sub Description_AfterUpdate()
'If the textbox contains data run the
'Spell Checker after data is entered.
    If Len(Me!Description & "") > 0 Then
        DoCmd.RunCommand acCmdSpelling
            Else
        Exit Sub
    End If

End Sub

Private Sub Description_BeforeUpdate(Cancel As Integer)

End Sub

Private Sub Subject_AfterUpdate()
'If the textbox contains data run the
'Spell Checker after data is entered.
    If Len(Me!Subject & "") > 0 Then
        DoCmd.RunCommand acCmdSpelling
            Else
        Exit Sub
    End If
End Sub
 
when you enter data into a new row it is only saved when you issue a save, or move to another record or close your form. Try saving the record before running the spell checker.
 
when you enter data into a new row it is only saved when you issue a save, or move to another record or close your form. Try saving the record before running the spell checker.

Is there some sort of save command I can issue when the first couple of fields are filled in? The subject and description fields are the 6th and 7th fields in the tab order.
 
search for help on acCMDSaverecord parameter of the doCmd.RunCommand object.
place this in the after update event of one of the controls.
 
Nope still doesnt seem to work properly. I've even put it as a click event on a cmd button and when I create new record its still jumping back to the last one on the spell checker. Its as if it holding it in the memory or something.

Edit: I've done a fix for it where I now have a command button which saves the form (although it probably isnt needed), closes the form and then open a new one in add mode. Seems to have got around the problem (and another I just noticed was happening :) ).
 
Last edited:

Users who are viewing this thread

Back
Top Bottom