Fabien
Fabien

Reputation: 457

Random case change in the code between form

In the code itself (so not in the .FRM or .VBP .OCX declaration section) some controls change their case (apparently randomly) after saving any modification :

-    If Me.CC_Absence = 1 Then Me.CC_REMPLACABLE = 0
+    If Me.CC_ABSENCE = 1 Then Me.CC_REMPLACABLE = 0

or

-    Me.GR_CRITERE.Visible = False
+    Me.GR_Critere.Visible = False

then the source control report change and ask for commit... Is it possible to get rid of that ?

Upvotes: 4

Views: 91

Answers (1)

Cali
Cali

Reputation: 311

That one is not a registry problem, it's due to a real bug in VB6 : at least another control in the project in another form and/or module with the same spelling have a different case.

Which case (upper/lower) will be retained for the code probably depend on the loading order of forms and/or modules and the last one seen is taken as a reference for the case...

Anyway, if you want to avoid that effect you should name all the same spelling controls in forms and/or modules in the project with the exactly same case.

Upvotes: 6

Related Questions