Returns the SQL statement that queries the database for the recordset.
Syntax
object.getSQLText()
Parameters
object
A Recordset script object.
Remarks
To set the SQL statement, call the setSQLText method.
Example
Sub myRS_onbeforeopen()
Msgbox "The query that is about to be executed is : " & myRS.getSQLText()
End Sub