Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control name lower case in VB code

Status
Not open for further replies.

FoxProProgrammer

Programmer
Apr 26, 2002
967
US
Hi,

One of the controls on my Form is named cbo_LRU. Every time a propery of the control is referenced in my VB code, the VB editor changes the case to cbo_lru. I searched for all occurrences of cbo_LRU in the code and can't figure out why the editor changes the text to lower case after I type it in upper case. This doesn't appear to have any effect on the program, but I would like the name and case in VB to match the name and case of the control on the Form. Does anyone know why it is acting this way? It's probably something simple that I am missing.

Thanks!

dz
 
No help on the "why", but if it's a consolation, it happens on text box & label names sometimes as well.

Silence is golden.
Duct tape is silver.
 
If you are sure the textbox name (in properties) is how you want it, what happens if you open the code window and use find/replace on the name (replace all).
 
genomon, Thanks for telling me that I'm not the only one that this has happened to. It sounds like it might be a bug in VBA or Access.

ZOR, I tried replace all before I posted here. It changed each occurrence, but as soon as it went to the next line, the text changed back to lower case.

I just had an idea...I'm going to comment out every line that uses the combo box - save the database and exit Access...then remove one of the comments and see if it corrects the problem. I'll report back after I have a chance to try this.

I was only concerned about this issue because I thought that I might have misspelled the control name or that it might not be recognized. For example, if you Dim a variable, every time you use it, VBA automatically spells it exactly as it is in the Dim statement.

Dim TestVar As Integer

If you type testvar = 4, the editor will change it to TestVar = 4 automatically.

That's why I thought something might be wrong, but I can't find any problem with the way the program runs or properties of the combo box.

Thanks...I'll get back to y'all



dz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top