Affichage des articles dont le libellé est Viewing The Output Of SQL Statements (i.e. "Debug.Print"). Afficher tous les articles
Affichage des articles dont le libellé est Viewing The Output Of SQL Statements (i.e. "Debug.Print"). Afficher tous les articles

Viewing The Output Of SQL Statements (i.e. "Debug.Print")

vendredi 27 février 2015

The following SQL statements run with no errors, but I can't see the output of the SQL statements. What is wrong with my "Debug.Print" or "rs" statement ? I would like to see the results. The SQL statements works when I save them to a query. Thanks ! ! !





Dim db As DAO.Database

Dim rs As DAO.Recordset

Rem Dim intResult As Integer

Dim strSQL As String



Set db = CurrentDb



strSQL = "SELECT Table_Payee_List.PayeeSelectBox, Table_Category_List.Category FROM Table_Payee_List INNER JOIN (Table_Category_List INNER JOIN Table_Payee_Category_Junction ON Table_Category_List.CategoryID=Table_Payee_Categor y_Junction.CategoryID) ON Table_Payee_List.PayeeSelectBox=Table_Payee_Catego ry_Junction.PayeeSelectBox " & _

"WHERE (((Table_Category_List.Category) = ""710A-College Students""));"



Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)



intResult = rs

Debug.Print



rs.Close

db.Close

Viewing The Output Of SQL Statements (i.e. "Debug.Print")

Labels