473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Access form changes the case of the letter "i" to "I" (capitalizes)

MLH
I have a textbox control used to enter a single
alphanumeric character. It changes the case
of "i" to upper case. But it does not do so with
the letter "g". Its left as "g" - not changed to "G"?

Although Access's attempts at keeping me
gramatically correct, it isn't helping me in this
particular case. Can I turn that behavior off
at will - on a case-by-case basis?
Nov 13 '05 #1
13 1759
On Fri, 17 Jun 2005 14:36:54 -0400, MLH wrote:
I have a textbox control used to enter a single
alphanumeric character. It changes the case
of "i" to upper case. But it does not do so with
the letter "g". Its left as "g" - not changed to "G"?

Although Access's attempts at keeping me
gramatically correct, it isn't helping me in this
particular case. Can I turn that behavior off
at will - on a case-by-case basis?


Your input "i" is being corrected to "I" by AutoCorrect.
To stop that from occurring either
1) set that controls AllowAutoCorrect property to No (only that
control is affected).
or
2) deleting that item from
Tools + AutoCorrect Options
as well as unchecking the Capitalize first letter of sentences box
(which will affect all Office applications).
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2
fredg <fg******@example.invalid> wrote in
news:cn******************************@40tude.net:
On Fri, 17 Jun 2005 14:36:54 -0400, MLH wrote:
I have a textbox control used to enter a single
alphanumeric character. It changes the case
of "i" to upper case. But it does not do so with
the letter "g". Its left as "g" - not changed to "G"?

Although Access's attempts at keeping me
gramatically correct, it isn't helping me in this
particular case. Can I turn that behavior off
at will - on a case-by-case basis?


Your input "i" is being corrected to "I" by AutoCorrect.
To stop that from occurring either
1) set that controls AllowAutoCorrect property to No (only that
control is affected).
or
2) deleting that item from
Tools + AutoCorrect Options
as well as unchecking the Capitalize first letter of sentences box
(which will affect all Office applications).


This is another example of a "feature" put into Access by people who
have absolutely no comprehension of what a database is for.
AutoCorrect adds a level of intervention between the user and the
data store that is controlled externally, and a developer cannot be
certain what will be in the AutoCorrect list.

This is another candidate for a subroutine that opens all the forms
in an MDB, walks through the Controls collection and sets the
AllowAutoCorrect property to FALSE. I can't see every using this
property myself, but if they provided it, they should have set it
OFF by default. And the property should not even exist at all for
controls that are designed for the purpose of validating data, such
as combo boxes.

This is an example of the kind of complete idiocy that Microsoft
produces because their product design is often driven more by
marketing than by technical requirements. Default Autocorrect
violates every principle of how a database application should work.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #3
MLH
<censored>
I agree with you, David. Is there a way to change the default setting
to Off - maybe some kind of option setting???

This is another candidate for a subroutine that opens all the forms
in an MDB, walks through the Controls collection and sets the
AllowAutoCorrect property to FALSE. I can't see every using this
property myself, but if they provided it, they should have set it
OFF by default. And the property should not even exist at all for
controls that are designed for the purpose of validating data, such
as combo boxes.

<censored>
Nov 13 '05 #4
MLH
AaaaHaaa! Very sneaky. OK, though. Was able to
fix it. At least this behavior can be turned on/off at
the control level. Whew! I have a lot of controls!
Not all of them will be adversely affected by the
self-imposed automation. But I'll still have to look
at 'em all to determine even that much. Oh well.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

On Fri, 17 Jun 2005 20:16:47 GMT, fredg <fg******@example.invalid>
wrote:
On Fri, 17 Jun 2005 14:36:54 -0400, MLH wrote:
I have a textbox control used to enter a single
alphanumeric character. It changes the case
of "i" to upper case. But it does not do so with
the letter "g". Its left as "g" - not changed to "G"?

Although Access's attempts at keeping me
gramatically correct, it isn't helping me in this
particular case. Can I turn that behavior off
at will - on a case-by-case basis?


Your input "i" is being corrected to "I" by AutoCorrect.
To stop that from occurring either
1) set that controls AllowAutoCorrect property to No (only that
control is affected).
or
2) deleting that item from
Tools + AutoCorrect Options
as well as unchecking the Capitalize first letter of sentences box
(which will affect all Office applications).


Nov 13 '05 #5
MLH <CR**@NorthState.net> wrote in
news:a1********************************@4ax.com:
This is another candidate for a subroutine that opens all the
forms in an MDB, walks through the Controls collection and sets
the AllowAutoCorrect property to FALSE. I can't see every using
this property myself, but if they provided it, they should have
set it OFF by default. And the property should not even exist at
all for controls that are designed for the purpose of validating
data, such as combo boxes.


I agree with you, David. Is there a way to change the default
setting to Off - maybe some kind of option setting???


No, there's no global option. It's something you have to set for
every control with an editable textbox. That means combo boxes and
text boxes.

The code to do this is pretty simple:

Public Sub GetRidOfAutoCorrect()
' Turns off AutoCorrect for all text boxes and combo boxes
' on all forms in an MDB
Dim cnt As DAO.Container
Dim doc As DAO.Document
Dim strForm As String
Dim ctl As Control

For Each cnt In CurrentDB.Containers
If cnt.Name = "Forms" Then
For Each doc In cnt.Documents
strForm = doc.Name
DoCmd.OpenForm strForm, acDesign
For Each ctl In Forms(strForm).Controls
If ctl.ControlType = acTextBox _
Or ctl.ControlType = acComboBox Then
ctl.AllowAutoCorrect = False
End If
Next ctl
DoCmd.Close acForm, strForm, acSaveYes
Next doc
End If
Next cnt

Set cnt = Nothing
Set doc = Nothing
Set ctl = Nothing
End Sub

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #6
David W. Fenton wrote:
For Each cnt In CurrentDB.Containers
If cnt.Name = "Forms" Then


Funny, why do you do this with foreach? Just curious

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #7
Bas Cost Budde wrote:
David W. Fenton wrote:
For Each cnt In CurrentDB.Containers
If cnt.Name = "Forms" Then

Funny, why do you do this with foreach? Just curious


Perhaps it saves him declaring a db variable and clearing it up after as
you'd need one to set cnt to db.containers("Forms") as using CurrentDb
directly has the potential to go out of scope straight after using it.

--
[OO=00=OO]
Nov 13 '05 #8
Trevor Best wrote:
Perhaps it saves him declaring a db variable and clearing it up after as
you'd need one to set cnt to db.containers("Forms") as using CurrentDb
directly has the potential to go out of scope straight after using it.


uh-huh, that's true. So CurrentDb doesn't go out of scope because it's
referenced in a loop structure? Great.
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #9
Bas Cost Budde <b.*********@heuvelqop.nl> wrote in
news:d9**********@localhost.localdomain:
Trevor Best wrote:
Perhaps it saves him declaring a db variable and clearing it up
after as you'd need one to set cnt to db.containers("Forms") as
using CurrentDb directly has the potential to go out of scope
straight after using it.


uh-huh, that's true. So CurrentDb doesn't go out of scope because
it's referenced in a loop structure? Great.


Well, the alternative to a For/Each loop is a counter, and that
requires declaring a variable, then knowing the index base for the
collection. A For/Each loop using the data type of the items within
the collection eliminates any need to know all of that.

The counter-based loop could also use the direct reference to the
collection without needing to instantiate a variable for it.

The nested For/Each loops in my code require a variable declaration
only for the object types used in the For/Each construct. That seems
to me to be efficient coding.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #10
David W. Fenton wrote:
Well, the alternative to a For/Each loop is a counter, and that
requires declaring a variable, then knowing the index base for the
collection. A For/Each loop using the data type of the items within
the collection eliminates any need to know all of that.

The counter-based loop could also use the direct reference to the
collection without needing to instantiate a variable for it.

The nested For/Each loops in my code require a variable declaration
only for the object types used in the For/Each construct. That seems
to me to be efficient coding.


Great. I see that.
Does it outweigh the performance issue linked to performing the test n-1
times?

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #11
Bas Cost Budde <b.*********@heuvelqop.nl> wrote in
news:d9**********@localhost.localdomain:
David W. Fenton wrote:
Well, the alternative to a For/Each loop is a counter, and that
requires declaring a variable, then knowing the index base for
the collection. A For/Each loop using the data type of the items
within the collection eliminates any need to know all of that.

The counter-based loop could also use the direct reference to the
collection without needing to instantiate a variable for it.

The nested For/Each loops in my code require a variable
declaration only for the object types used in the For/Each
construct. That seems to me to be efficient coding.


Great. I see that.
Does it outweigh the performance issue linked to performing the
test n-1 times?


Eh? With a For/Each loop you don't care about the index base of the
collection, so there's no calculation required to determine N-1 (and
some collections are *not* 0-based). It runs exactly as many times
as the .Count of the collection indicates -- it's built into the
structure to do that.

So, basically, I have no idea whatsoever what question you're
asking!

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #12
David W. Fenton wrote:
Eh? With a For/Each loop you don't care about the index base of the
collection, so there's no calculation required to determine N-1 (and
some collections are *not* 0-based). It runs exactly as many times
as the .Count of the collection indicates -- it's built into the
structure to do that.

So, basically, I have no idea whatsoever what question you're
asking!


Grin. I apologize for being far too short-worded.

Inside the For...Each, which runs .Count times indeed, you test for a
name that we expect to occur only once. That means you flush .Count-1
passes of the For. This, I expect, eats up a little time.

Describing this, I feel the extra time involved may shrink to nothing
compared to the assignments you would need in the other scenario.
Especially since the Containers collection is fairly small.

Thanks for listening to me, then. :-)
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #13
Bas Cost Budde <b.*********@heuvelqop.nl> wrote in
news:d9**********@localhost.localdomain:
David W. Fenton wrote:
Eh? With a For/Each loop you don't care about the index base of
the collection, so there's no calculation required to determine
N-1 (and some collections are *not* 0-based). It runs exactly as
many times as the .Count of the collection indicates -- it's
built into the structure to do that.

So, basically, I have no idea whatsoever what question you're
asking!
Grin. I apologize for being far too short-worded.

Inside the For...Each, which runs .Count times indeed, you test
for a name that we expect to occur only once. That means you flush
.Count-1 passes of the For. This, I expect, eats up a little time.


Well, you could Exit the For, just as you can Exit Loops when you
are looking only for the first match:

Public Sub GetRidOfAutoCorrect()
' Turns off AutoCorrect for all text boxes and combo boxes
' on all forms in an MDB
Dim cnt As DAO.Container
Dim doc As DAO.Document
Dim strForm As String
Dim ctl As Control

For Each cnt In CurrentDB.Containers
If cnt.Name = "Forms" Then
For Each doc In cnt.Documents
strForm = doc.Name
DoCmd.OpenForm strForm, acDesign
For Each ctl In Forms(strForm).Controls
If ctl.ControlType = acTextBox _
Or ctl.ControlType = acComboBox Then
ctl.AllowAutoCorrect = False
End If
Next ctl
DoCmd.Close acForm, strForm, acSaveYes
Next doc
Exit For '<===============Exit here
End If
Next cnt

Set cnt = Nothing
Set doc = Nothing
Set ctl = Nothing
End Sub
Describing this, I feel the extra time involved may shrink to
nothing compared to the assignments you would need in the other
scenario. Especially since the Containers collection is fairly
small.


That's a reason for not bothering with it in the original code, but
I think it's better practice to exit a loop when you're looking for
a single match (or a first match).

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #14

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

Similar topics

3
by: Pavils Jurjans | last post by:
Hello, I have bumped upon this problem: I do some client-side form processing with JavaScript, and for this I loop over all the forms in the document. In order to identify them, I read their...
3
by: screenwriter776 | last post by:
Hi, folks - Perhaps you could help me with a search form I am building. I have a table with a field in it. I want to return dates inside two parameters the user enters into a search form:...
3
by: MHenry | last post by:
All the lower case "c" in my database table are now upper case "C" starting in January 2004. All prior data is fine. I just noticed this after installing a Microsoft update patch a couple of days...
0
by: internetmike | last post by:
I have a client database with a parent form and a tab control on the child form for all my child tables, such as Enquiry, Application, Journal, etc. I am trying to design a "dashboard" panel in...
2
by: yashgt | last post by:
Hi, Does anyone have any experience with any JS library that provides a rich text editor? I am particularly interested in the MS-word like feature of tracking changes. Simple features like...
1
by: egrill | last post by:
I need assistance on how I can keep the results of a calculated field as part of a record. Each time I use the form I loose the previous calculation. I can set-up the form calculation but want to...
6
by: Deano | last post by:
Every once in a while I modify one particular form (could be anything from adding code to tweaking properties as far as I can see) and upon loading I get; "You can't assign a value to this...
2
by: Sheldon | last post by:
If I type lower case "i" in a one byte text field, it automatically converts to an upper case "I". If I type in any other lower case letter it syays in the field as I typed it. If I make the...
3
by: eBob.com | last post by:
How does a "sub-form", i.e. one invoked by another form, determine anything about the form which brought it into existence, i.e., I suppose, instantiated it? I wanted to so something like this ......
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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...
0
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,...
0
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...

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.