473,503 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Spell checker

I am trying to use the spell checker on an unbound control in Access
2000. I run the checker in the AfterUpdate event of the control.
After the spell checker is done, I get the following message:

The Macro or Function set to the BeforeUpdate or ValidationRule
Property for this field is preventing MS Access from saving the data
in the field.

I have no validation code or mask and no code in the Before
Update event.
This is the spell checker code:

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

Any ideas?
Hank Reed
Nov 13 '05 #1
7 3483
Hank Reed wrote:
I am trying to use the spell checker on an unbound control in Access
2000. I run the checker in the AfterUpdate event of the control.
After the spell checker is done, I get the following message:

The Macro or Function set to the BeforeUpdate or ValidationRule
Property for this field is preventing MS Access from saving the data
in the field.

I have no validation code or mask and no code in the Before
Update event.
This is the spell checker code:

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

Any ideas?
Hank Reed


I made a copy of your form, created a command button called Spell and
ran your code. It ran fine.

I then put your code in the afterupdate event of control and ran it and
got your error.

I then modified your code to below and got the same error.

I then moved the modified code to the LostFocus event and it ran fine.

I am not sure why you want to enumerate all controls when you are
wanting to spellcheck a single control. Anyway, see if the below works
in the LostFocus.

Dim ctlSpell As Control
Set ctlSpell = Me.ActiveControl
If Len(ctlSpell) > 0 Then
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunCommand acCmdSpelling
End If
Nov 13 '05 #2


I didn't actually want to spell check all controls. That was just
the sample code I got off of the NG. I also made it work from the
LostFocus event but you may find that you can never go to ay other
control as the spell checker will run on every LostFocus and send you
right back to the original control.

One curious thing is that if I programatically highlight the text
and then manually hit F7, it works fine.

Thanks
Hank Reed

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
Hank wrote:

I didn't actually want to spell check all controls. That was just
the sample code I got off of the NG. I also made it work from the
LostFocus event but you may find that you can never go to ay other
control as the spell checker will run on every LostFocus and send you
right back to the original control.
????. I don't follow you. The code I provided spell checks only 1 control.

I'm not sure why you didn't use the code I provided to spell check the
control you were on instead of continuing to use code to enumerate all
of the controls and spell check them all.. Well, if it works the way
you want, that's the important thing.

One curious thing is that if I programatically highlight the text
and then manually hit F7, it works fine.

Thanks
Hank Reed

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #4
Salad,
Thanks for your continued interest but I don't think you read my
response. I only want to check ONE CONTROL. What I posted was some
sample code off the NG. Whether I am checking one or more controls, the
real problem is that Access does not allow the spell checker to update
the text and gives the error message stated above.
Also I didn't mean that I would be satisfied with the F7 solution.
I only mentioned it as another clue.
I am hoping someone will know what the error message means and how
to get around it.
Thanks again,
Hank Reed

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5
Hank wrote:
Salad,
Thanks for your continued interest but I don't think you read my
response.
I did.

I only want to check ONE CONTROL.

OK. What part of the code I provide do you not understand?

What I posted was some sample code off the NG.
And so you modify it. As I did.

Whether I am checking one or more controls, the real problem is that Access does not allow the spell checker to update
the text and gives the error message stated above.
Not true. I think you need a programmer at this point. You were given
a solution that you don't understand.
Also I didn't mean that I would be satisfied with the F7 solution.
I only mentioned it as another clue.
I am hoping someone will know what the error message means and how
to get around it.


You were given the solution. Take a horse to water but you can't make
them drink and so forth....
Nov 13 '05 #6
Salad,
What is the point of your rudeness? I am a programmer and have
probably been doing this longer than you. A huge problem with this NG
is that when a reader doesn't understand the post he chooses to bite
someones head off. The lack of understanding is usually caused by not
reading the post or not understanding the question. I have had many
answers from posters who simply said, "Why would you want to do that?"
Not very contructive.
I have no desire to continue this diatribe and I hope you don't.
Thanks for your efforts.
Hank Reed

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #7
Hank wrote:
Salad,
What is the point of your rudeness?


Your tone was actually rather impatient, though you probably didn't mean
it, after s/he'd done all that testing for you.
--
Tim - http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9700
by: Leo P. | last post by:
I am trying to write a spelling checker. Specifically the part that suggests words. From what I've read online, it seems like the preferred way to do this, is to find the double metaphone...
84
5816
by: Andy Glew | last post by:
I am in search of any rigourous, scientific, academic or industrial studies comparing naming conventions in C++ or similar languages such as Ada: Specifically, are names formed with...
2
2220
by: WM Chung | last post by:
Hi all, I need to include spell check utilities into my dotnet application. Is this a ready-to-use facility in dotnet ? Or do I need to use third party tool ? I use Visual Studio 2002. Thanks...
8
2093
by: Joe | last post by:
Hello All: Does anyone know of a spell checker that works with .NET? Any options will be welcome. TIA, -- Joe
4
6239
by: sweetguy1only | last post by:
Hi all, I am a MS Access developer using VB 6 (yes, I know it is a bit old). The problem I am having is, I have a software that allows my customers to put in the information of their clients....
6
10818
by: Neil | last post by:
Is there way to have control over the MS-Access spell checking (besides just launching it)? We want to tell it to check all records, but skip certain fields (or, alternatively, ONLY check certain...
22
2864
by: SmokeWilliams | last post by:
Hi, I am working on a Spell checker for my richtext editor. I cannot use any open source, and must develop everything myself. I need a RegExp pattern to split text into a word array. I have...
9
6253
by: ARC | last post by:
Hello all, I developed a tool a year or so ago for adding your own spell-checker to an access application. This is mainly for those using the runtime, as you can't distribute the spell-checker...
3
4005
by: Mike | last post by:
I have an app running at a client where, when the spell checker is supposed to run, it reports "Can't start spell checker because it is not installed". I have never had this before - it works...
0
7198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.