
Retrieve Records from a Supplied SQL Statement
To retrieve the required field from the table based on the supplied condition, use the following code: Function GetQueryResults(strSql As String, Optional ReadOnly As Boolean = True) _As Recordset Dim rstQueryResult As Recordset Set rstQueryResult = New Recordset strSql = GetQueryString(strSql) rstQueryResult.CursorLocation = adUseClient ‘ gCnn is the Connection Object