From: cmk7471 on
I'm using an ODBC connection to our business system to spell check product
descriptions for our online catalog. I'm using a form to view the data in the
business system. When spell check makes a change to a description I would
like the ChangeDate field for that description to be updated to the current
date. I tried OnDirty, OnChange, AfterUpdate and none of them seem to occur
when spell check makes a change.

Thanks!
From: Arvin Meyer [MVP] on
Event's don't fire in response to code, so you'll have to add the Code to
the control or form AfterUpdate event, along with the spell check. You can
do the spell checking in code as well:

Public Function Spell()
' Arvin Meyer 9/17/1998
' Adapted from code by Terry Wickenden
Dim ctlSpell As Control
Dim frm As Form
Set frm = Screen.ActiveForm
DoCmd.SetWarnings False
' Enumerate Controls collection.
For Each ctlSpell In frm.Controls
If TypeOf ctlSpell Is TextBox Then
If Len(ctlSpell) > 0 Then
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunCommand acCmdSpelling
End If
End If
Next
DoCmd.SetWarnings True
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"cmk7471" <kaluscheatnphdotwelsdotnet> wrote in message
news:A97B08AE-CE4A-4884-9B6C-0D9F263FF4A7(a)microsoft.com...
> I'm using an ODBC connection to our business system to spell check product
> descriptions for our online catalog. I'm using a form to view the data in
> the
> business system. When spell check makes a change to a description I would
> like the ChangeDate field for that description to be updated to the
> current
> date. I tried OnDirty, OnChange, AfterUpdate and none of them seem to
> occur
> when spell check makes a change.
>
> Thanks!


From: cmk7471 on
I think it may be simpler than that. I only have to spell check one text box
for each record so I don't need to examine all the controls. The user is
running spell check from the menu or <F7>, so I'm not using any code to run
spell check. I want the user to choose whether to change or ignore each item
found by spell check. I just want to update the ChangeDate field for the
record if spell check makes a change to that description. I don't know if it
makes a difference, but I am using a continuous form to see multiple records
at once. I tried using the AfterUpdate, Dirty, and Change events for the text
box that spell check is changing but it seems those events aren't being
triggered by the spell check. Here's an example of the code I put in the text
box's event.

Private Sub ITC_DESC_AfterUpdate()
ITC_CHG_DATE = Date
End Sub

"Arvin Meyer [MVP]" wrote:

> Event's don't fire in response to code, so you'll have to add the Code to
> the control or form AfterUpdate event, along with the spell check. You can
> do the spell checking in code as well:
>
> Public Function Spell()
> ' Arvin Meyer 9/17/1998
> ' Adapted from code by Terry Wickenden
> Dim ctlSpell As Control
> Dim frm As Form
> Set frm = Screen.ActiveForm
> DoCmd.SetWarnings False
> ' Enumerate Controls collection.
> For Each ctlSpell In frm.Controls
> If TypeOf ctlSpell Is TextBox Then
> If Len(ctlSpell) > 0 Then
> With ctlSpell
> .SetFocus
> .SelStart = 0
> .SelLength = Len(ctlSpell)
> End With
> DoCmd.RunCommand acCmdSpelling
> End If
> End If
> Next
> DoCmd.SetWarnings True
> End Function
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
>
>
> "cmk7471" <kaluscheatnphdotwelsdotnet> wrote in message
> news:A97B08AE-CE4A-4884-9B6C-0D9F263FF4A7(a)microsoft.com...
> > I'm using an ODBC connection to our business system to spell check product
> > descriptions for our online catalog. I'm using a form to view the data in
> > the
> > business system. When spell check makes a change to a description I would
> > like the ChangeDate field for that description to be updated to the
> > current
> > date. I tried OnDirty, OnChange, AfterUpdate and none of them seem to
> > occur
> > when spell check makes a change.
> >
> > Thanks!
>
>
> .
>
From: Arvin Meyer [MVP] on
One control, piece of cake:

Private Sub txtMyControl_AfterUpdate()
If Len(Me.txtMyControl) > 0 Then
DoCmd.RunCommand acCmdSpelling
End If
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"cmk7471" <kaluscheatnphdotwelsdotnet> wrote in message
news:0A19B48A-FF8B-41E2-B3BC-BBF790EC5F50(a)microsoft.com...
>I think it may be simpler than that. I only have to spell check one text
>box
> for each record so I don't need to examine all the controls. The user is
> running spell check from the menu or <F7>, so I'm not using any code to
> run
> spell check. I want the user to choose whether to change or ignore each
> item
> found by spell check. I just want to update the ChangeDate field for the
> record if spell check makes a change to that description. I don't know if
> it
> makes a difference, but I am using a continuous form to see multiple
> records
> at once. I tried using the AfterUpdate, Dirty, and Change events for the
> text
> box that spell check is changing but it seems those events aren't being
> triggered by the spell check. Here's an example of the code I put in the
> text
> box's event.
>
> Private Sub ITC_DESC_AfterUpdate()
> ITC_CHG_DATE = Date
> End Sub
>
> "Arvin Meyer [MVP]" wrote:
>
>> Event's don't fire in response to code, so you'll have to add the Code to
>> the control or form AfterUpdate event, along with the spell check. You
>> can
>> do the spell checking in code as well:
>>
>> Public Function Spell()
>> ' Arvin Meyer 9/17/1998
>> ' Adapted from code by Terry Wickenden
>> Dim ctlSpell As Control
>> Dim frm As Form
>> Set frm = Screen.ActiveForm
>> DoCmd.SetWarnings False
>> ' Enumerate Controls collection.
>> For Each ctlSpell In frm.Controls
>> If TypeOf ctlSpell Is TextBox Then
>> If Len(ctlSpell) > 0 Then
>> With ctlSpell
>> .SetFocus
>> .SelStart = 0
>> .SelLength = Len(ctlSpell)
>> End With
>> DoCmd.RunCommand acCmdSpelling
>> End If
>> End If
>> Next
>> DoCmd.SetWarnings True
>> End Function
>> --
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.accessmvp.com
>> http://www.mvps.org/access
>>
>>
>> "cmk7471" <kaluscheatnphdotwelsdotnet> wrote in message
>> news:A97B08AE-CE4A-4884-9B6C-0D9F263FF4A7(a)microsoft.com...
>> > I'm using an ODBC connection to our business system to spell check
>> > product
>> > descriptions for our online catalog. I'm using a form to view the data
>> > in
>> > the
>> > business system. When spell check makes a change to a description I
>> > would
>> > like the ChangeDate field for that description to be updated to the
>> > current
>> > date. I tried OnDirty, OnChange, AfterUpdate and none of them seem to
>> > occur
>> > when spell check makes a change.
>> >
>> > Thanks!
>>
>>
>> .
>>


From: Linq Adams via AccessMonster.com on
"...I'm not using any code to run spell check."

Sure you are! When you press <7> you're using code that built into Access!

Control events, as you've found out, don't fire unless you ***physically***
enter data, either by typing it in or pasting data into it.

Date stamping a record should ***always*** be done in the Form_BeforeUpdate
event! This event will ***always*** fire when a change has been made to the
data, regardless of how that change was made, and the record is saved, thru
moving to a new record, closing the form, or an explicit save. If spell check
is run and no change is made, Form_BeforeUpdate will not fire and the date
stamp won't change.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com