Description
Reports the number of the current row (the row with focus).
Syntax
CurrentRow ( )
Return value
Long. Returns the number of the row if it succeeds and 0 if no row is current.
What row is current
The current row is not always a row displayed on the screen. For example, if the cursor is on row 7 column 2 and the user uses the scroll bar to scroll to row 50, the current row remains row 7 unless the user clicks row 50.
Examples
This expression in a computed field returns the number of the current row:
CurrentRow()
This expression for a computed control displays an arrow bitmap as an indicator for the row with focus and displays no bitmap for rows not having focus. As the user moves from row to row, an arrow marks where the user is:
Bitmap(If(CurrentRow() = GetRow(),"arrow.bmp",""))
Alternatively, this expression for the Visible property of an arrow picture control makes the arrow bitmap visible for the row with focus and invisible for rows not having focus. As the user moves from row to row, an arrow marks where the user is:
If(CurrentRow() = GetRow(), 1, 0)
See also