Table of contents

CodeProject.Name 属性 (访问)CodeProject.Name Property (Access)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

名称属性可用于确定标识对象名称的字符串表达式。只读的字符串You can use the Name property to determine the string expression that identifies the name of an object. Read-only String.



表达式_一个表示CodeProject对象的变量。_expression A variable that represents a CodeProject object.


有效的名称必须符合 Microsoft Access 的标准命名规则。对于 Microsoft Access 对象,名称长度不能超过 64 个字符。对于控件,名称长度不能超过 255 个字符。A valid name must conform to the standard naming conventions for Microsoft Access. For Microsoft Access objects, the name may be up to 64 characters long. For controls, the name may be as long as 255 characters.

新对象的默认名称是对象名称加上一个唯一的整数。例如,第一个新窗体 Form1,第二个新窗体为 Form2,依此类推。窗体不能与另一个系统对象,如屏幕对象相同的名称。The default name for new objects is the object name plus a unique integer. For example, the first new form is Form1, the second new form is Form2, and so on. A form can't have the same name as another system object, such as the Screenobject.

对于未绑定控件,默认名称是控制加上一个唯一的整数类型。例如,如果您向表单中添加的第一个控件为文本框,其Name属性设为文本 1For an unbound control, the default name is the type of control plus a unique integer. For example, if the first control you add to a form is a text box, its Name property setting is Text1

对于绑定控件,默认名称是字段的基础数据源中的名称。如果通过从字段列表中拖动字段创建控件,则字段的FieldName属性设置将复制到控件的名称属性框中。For a bound control, the default name is the name of the field in the underlying source of data. If you create a control by dragging a field from the field list, the field's FieldName property setting is copied to the control's Name property box.

不能用“窗体”或“报表”命名控件或节。You can't use "Form" or "Report" to name a control or section.

同一窗体、报表或数据访问页上的控件的名称不能相同,但不同窗体、报表或数据访问页上的控件名称可以相同。同一窗体上的控件和节不能共享一个名称。Controls on the same form, report, or data access page can't have the same name, but controls on different forms, reports or data access pages can have the same name. A control and a section on the same form can't share the same name.

另请参阅See also


CodeProject 对象CodeProject Object

© 2018 Microsoft