Subject: Auto Capitalization in VBA Editor - WHY?
From: co******@aol.combvwertz (Corepaul)
Date: 10/22/2003 3:07 PM Central Daylight Time
Message-id: <20***************************@mb-m14.aol.com>
I am new to Access 2000. My operating system is Windows 2000.
I have a Command Button named "btnAlbumUp". The first time that I
reference this button in VBA code, the Visual Basic Editor capitalizes
the P changing
btnAlbumUp.SetFocus
to
btnAlbumUP.SetFocus
I double checked that the control was defined on the form with a small p (it
was). I did a Edit/Find search for "btnAlbum" and confirmed that I hadn't
mistyped the name somewhere else in the VBA code (this is the first and only
reference to this control in VBA code).
Everything seems to work OK.
Paul Core
co************@aol.com
Subject: Re: Auto Capitalization in VBA Editor - WHY?
From: "Wayne Morgan" co***************************@hotmail.com
Date: 10/22/2003 3:47 PM Central Daylight Time
Message-id: <c1******************@newssvr33.news.prodigy.com >
Try typing
Me.
in the form's code module. When you hit the period, it should give you a
list of available commands, including the controls on the form. Scroll down
this list, how does it show the capitalization? If it doesn't show the
capital P and if you use the Me. in front of the control name, does it still
capitalize the P? If not, then it is getting it from something somewhere
else in the database.
--
Wayne Morgan
Adding the self-reference explicitly (Me.btnAlbumUP.Set Focus ) did not help.
When I looked at the list of controls as you suggest, it is spelled btnAlbumUP,
even though it is spelled with a small p in the objects list in the form design
view.
Paul Core
Subject: Re: Auto Capitalization in VBA Editor - WHY?
From: MGFoster me@privacy.com
Date: 10/22/2003 6:26 PM Central Daylight Time
Message-id: <qm****************@newsread3.news.pas.earthlink.n et>
It's a peculiarity (mild bug/annoyance) in the VBA development
environment. Sometimes compacting the project cures it.
The code is not case sensitive - so it doesn't matter much.
I am an amateur programmer working by myself on personal projects. Small
projects compared with commercial efforts. Anyway, I never compacted a project.
I tried completely removing the control and ALL references to it, saving the
project, and reinstalling the control being VERY careful to use a small p the
first time, and every other time, the control name is entered. The behavior did
NOT change (small p in design view, cap P in VB code).
You are correct that it does not affect performance, the program runs fine.
When I see something I don't understand, I can't help thinking about it. Excuse
my quixotic pursuit, but I would like to test whether or not removing the
control and then compacting the project before reinserting the control will
work. However, I am afraid to try it without advice from someone who has done
this before.
What are the steps to compact a project?
Are there any potential problems I should watch for? Any hints not easily found
in the on-line help?
Under what other conditions should a project be compacted?
Thanks for the comments.
Paul Core