Full Version: Why does VBA capitalize things for me?
UtterAccess Forums > Microsoft® Access > Access Forms
My example:
I have an unbound text edit called "txtLenderPhone" that I am writng code to populate (i.e. txtLenderPhone = SomeString). The problem is that when I type "txtLenderPhone" in the VBA editor, it automatically capitalizes the first letter, and leaves the text as "TxtLenderPhone". This is not the name of the control I'm concerned with. My assumption is that I had declared a variable of that name somewhere, and it's changing it to accomodate that, but a search of the entire project didn't find anything. Also, I have about 2 dozen other text edits on this same page that all start with "txt" and none of them are being capitalized.
click into the variable then hold down shift and hit F2, this should navigate you to where TxtLenderPhone was declared (if it has been)
Hmmm...I did that, and I get a message telling me: "Cannot jump to TxtLenderPhone because it is in the library '<MY_CURRENT_PROJECT.MDB> ' and it is not referenced."
actually tried to add the current project as a reference, but it wouldn't let me...which I take as a good thing. I don't understand why it can't jump to something that's part of itself. Seems strange to me.
Sorry, 'fraid I don't know that one. I put a shout out to see if anyone else can help.
Double-check the capitalisation of the control on the form.
Access does not always delete variables properly. If you import everything into a blank database the problem will go away
The import to a clean DB fixed it. Thanks for the info!
That a crappy little bug.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.