[color=blue][color=green]
>>Subject: Auto Capitalization in VBA Editor - WHY?
>>From:
corepaul@aol.combvwertz (Corepaul)
>>Date: 10/22/2003 3:07 PM Central Daylight Time
>>Message-id: <20031022160728.08854.00000549@mb-m14.aol.com>[/color][/color]
[color=blue][color=green]
>>I am new to Access 2000. My operating system is Windows 2000.[/color][/color]
[color=blue][color=green]
>>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[/color][/color]
[color=blue][color=green]
>>btnAlbumUp.SetFocus[/color][/color]
[color=blue][color=green]
>>to[/color][/color]
[color=blue][color=green]
>>btnAlbumUP.SetFocus[/color][/color]
[color=blue][color=green]
>>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).[/color][/color]
[color=blue][color=green]
>>Everything seems to work OK.
>>Paul Core
>>corepaulNoSpam@aol.com[/color][/color]
Subject: Re: Auto Capitalization in VBA Editor - WHY?
From: "Wayne Morgan"
comprev_gothroughthenewsgroup@hotmail.com
Date: 10/22/2003 3:47 PM Central Daylight Time
Message-id: <c1Clb.13890$Oq2.3547@newssvr33.news.prodigy.com >
[color=blue]
>Try typing[/color]
[color=blue]
>Me.[/color]
[color=blue]
>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.[/color]
[color=blue]
>--
>Wayne Morgan[/color]
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
[color=blue]
>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: <qmElb.1375$wc3.522@newsread3.news.pas.earthlink.n et>[/color]
[color=blue]
>It's a peculiarity (mild bug/annoyance) in the VBA development
>environment. Sometimes compacting the project cures it.[/color]
[color=blue]
>The code is not case sensitive - so it doesn't matter much.[/color]
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