Editor keeps converting keyword to lowercase

delikedi

Registered User.
Local time
Today, 05:28
Joined
Apr 4, 2012
Messages
87
Whenever we type keywords such as "recordset" or "string", VBA editor converts them to proper case, "Recordset" and "String", respectively.

I am now experiencing a problem such that whenever I write "recordset" it does not get converted to proper case (its initial letter is not capitalized). On the contrary, no matter how hard I try to rewrite it as "Recordset" or "DAO.Recordset", vbe converts it to lowercase, e.g. "recordset" and "DAO.recordset". Batch find&replace operations don't work either. Other keywords, such as "QueryDef.OpenRecordset" are not affected.

On the other hand, there's no function loss. the word is interpreted and evaluated by the compiler as the keyword it was intended to be, and everything works. However I find it very irritating and consider it to be a serious problem.

I tried copying, renaming forms and the database, without result. Any suggestions on how to fix it would be appreciated.
 
why does it matter, if it works.

i can't actually recall whether i see upper or lower case, to be honest.
 
I too find this annoying although I have found that if I go back and "prompt" the VBA editor by correcting the case in a dim statement or a Set statement, it recovers and fixes the other instances.
 
I solved the problem by creating a new database and importing everything from the old one into it. Thanks for the answers.

@Pat,
Yes, I have encountered this problem before and it almost always gets resolved the way you described, by correcting the syntax at the Dim declarations area. I also remember a time when I had to create a copy of a form and deleting the old one to get rid of a similar bug. However this time the whole project was bugged, instead of just a single procedure. I even did a ctrl+H on all 60+ instances of the word "recordset" throughout the project and all of them went back to lowercase. I had never seen this problem go viral like that.
 
Corruption is a terrible thing. One bad form can cause a series of very strange errors. Recreating the database is the only way to get rid of it although sometimes the /Decompile feature will do it.
 

Users who are viewing this thread

Back
Top Bottom