Okay, might have something. Form is bound to table that has fields Filename1, Filename2, etc. But the code is expecting textboxes with those names. I change Me.Filename1 to Me!Filename1 and the error goes away.
The error triggers whether or not Option Explicit is used. Changing from . to ! and no longer get error on those references but others will have same issue, such as [RoofText]. No such field or textbox by that name, there is RoofOtherText - fix code. There are more where there is a field but no corresponding textbox on form.
Option Explicit should be in every code module but including at this time will not help fix this issue.
Going to have to learn some VBA to upgrade this code. The . will provoke intellisense popup tips as you type code. So behind the form as you type Me. you will get a popup list of properties and controls associated with the form. Type Me.RoofOtherText. and you will get popup list of properties associated with that control. Whereas Me!RoofOtherText references the field.
There is a bunch of procedures like:
Code:
Private Sub HideComm()
[ComboRoof].Enabled = False
[RoofOtherText].Enabled = False
[ComboFloors].Enabled = False
[FloorsText].Enabled = False
[ComboMasonry].Enabled = False
[WallsMText].Enabled = False
[ComboFrame].Enabled = False
[WallsFText].Enabled = False
End Sub
To take advantage of the . intellisense, revise code as:
Code:
Private Sub HideComm()
With Me
.[ComboRoof].Enabled = False
.[RoofOtherText].Enabled = False
.[ComboFloors].Enabled = False
.[FloorsText].Enabled = False
.[ComboMasonry].Enabled = False
.[WallsMText].Enabled = False
.[ComboFrame].Enabled = False
.[WallsFText].Enabled = False
End With
End Sub
Since there is no textbox named [FloorsText], this line will still error because Enabled is property of textbox (and other controls) but not field.
The use of [ ] are not really needed since naming convention does not use spaces nor punctuation/special characters (underscore is only exception to this restriction) nor reserved words, however, they should not interfere.
It's still a mystery why this does not error for other users. Are you positive you have the same db?