Table of contents
TOC
折叠目录
展开目录

Label.Left 属性 (访问)Label.Left Property (Access)

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

您可以使用Left属性可以指定在窗体或报表对象的位置。读取/写入的整数You can use the Left property to specify an object's location on a form or report. Read/write Integer.

语法Syntax

表达式向左expression. Left

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

注解Remarks

在 Visual Basic 中,使用数值表达式设置此属性的值,值以缇为单位表示。In Visual Basic, use a numeric expression to set the value of this property. Values are expressed in twips

对于报表,当报表处于打印预览或打印状态时,只能使用 Visual Basic 中的宏或事件过程来设置这些属性。For reports, you can set these properties only by using a macro or event procedure in Visual Basic while the report is in Print Preview or being printed.

对于报表, Left属性设置是当前节偏离页左侧的距离。该属性以缇为单位。可以使用此属性来指定页下方的打印该节的Format事件过程中的部分。For reports, the Left property setting is the amount the current section is offset from the left of the page. This property is expressed in twips. You can use this property to specify how far down the page you want a section to print in the section's Format event procedure.

示例Example

下面的示例将检查当前报表的Left属性设置。如果值小于最小页边距设置, NextRecordPrintSection属性设置为False (0)。节不会前进到下一个记录,并不会打印下一个节。The following example checks the Left property setting for the current report. If the value is less than the minimum margin setting, the NextRecord and PrintSection properties are set to False (0). The section doesn't advance to the next record, and the next section isn't printed.

Sub Detail1_Format(Cancel As Integer, FormatCount As Integer) 

 Const conLeftMargin = 1880 

 ' Don't advance to next record or print next section 
 ' if Left property setting is less than 1880 twips. 
 If Me.Left < conLeftMargin Then 
 Me.NextRecord = False 
 Me.PrintSection = False 
 End If 

End Sub

另请参阅See also

概念Concepts

标签对象Label Object

© 2018 Microsoft