Report.CurrentY Property
Access Developer Reference |
You can use the CurrentY property (along with the CurrentX property) to specify the horizontal and vertical coordinates for the starting position of the next printing and drawing method on a report. Read/write Single.
Syntax
expression.CurrentY
expression A variable that represents a Report object.
Remarks
For example, you can use these properties to determine where the center point of a circle is drawn on a report section.
The coordinates are measured from the upper-left corner of the report section that contains the reference to the CurrentX or CurrentY property. The CurrentX property setting is 0 at the section's left edge, and the CurrentY property setting is 0 at its top edge.
You can set the CurrentX and CurrentY properties in an event procedure specified by the OnPrint property setting of a report section.
Use the ScaleMode property to define the unit of measure, such as points, pixels, characters, inches, millimeters, or centimeters, that the coordinates will be based on.
When you use the following graphics methods, the CurrentX and CurrentY property settings are changed as indicated.
Method | Sets CurrentX, CurrentY properties to |
---|---|
The center of the object. |
|
The end point of the line (the x2, y2 coordinates). |
|
The next print position. |
Example
The following example uses the Print method to display text on a report named Report1. It uses the TextWidth and TextHeight methods to center the text vertically and horizontally.
Visual Basic for Applications |
---|
|
See Also