Name property (field)


The Name property specifies the internal name VBA uses to reference a window field or report field object.




field – A window field or report field object.


You cannot set the Name property at runtime. We recommend that you change a field’s Name property using the Visual Basic Properties window. Be sure to replace all referenced occurrences of the field with the new name.

Use the Name property to change the field name when you need to resolve naming conflicts between fields and other objects in your application. Naming conflicts typically arise between names in your project and reserved words in VBA. For instance, if you add the Account Maintenance window’s Currency button to your project, you can’t compile VBA code referencing that field until you rename the field. “Currency” in VBA is a reserved word.

You can also use the Name property to make a field’s name more readable in VBA code.

Documentation Feedback