473,583 Members | 3,114 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.ActiveFo rm
DoCmd.SetWarnin gs 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.RunComman d acCmdSpelling
End If
End If
Next
DoCmd.SetWarnin gs True

Any ideas?
Hank Reed
Nov 13 '05 #1
7 3500
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.ActiveFo rm
DoCmd.SetWarnin gs 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.RunComman d acCmdSpelling
End If
End If
Next
DoCmd.SetWarnin gs 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.ActiveContro l
If Len(ctlSpell) > 0 Then
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunComman d 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
9711
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 equivalent of a mispelled word, then to compute the mispelled word's distance from other words which have the same, or a similar metaphone equivalent. ...
84
5867
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 underscores more or less readable than names formed with MixedCase StudlyCaps camelCase?
2
2232
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 in advance. W.M. Chung
8
2104
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
6246
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. A client of one of my customer has a last name of "Cotten". Whenever they put in the last name as "Cotten", the spell checker automatically...
6
10823
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 fields). Is that possible? Alternatively, if that's not, we noticed that the spell checker skips fields that are disabled. So one could disable the...
22
2880
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 been doing it by splitting by spaces or <ptags. I run into a probelm with the richtext part of my editor. When I change the font, it wraps the text...
9
6257
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 ability. After many complaints from my runtime customers, I decided to develop my own, which was a good challenge. I just wanted to give something...
3
4014
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 fine at other user sites and on my development setup. The app runs on MS Access 2002 runtime. Is there maybe an incompatibility with Office 2007?
0
7896
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7827
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7936
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8195
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6581
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5701
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3820
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3845
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1434
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.