I would like to extract a field (SSN) from a query results using the OpenRecordSet Method.
When I use the following code, the error "RunTime Error 3061 Too Few Parmeters" is displayed. When I run the query from the database window, it executes without error.
Any guidance would be appreciated.
-jackie
Below is the code:
sql = "SELECT qry_max_hrs_multi_letter.SSN FROM qry_max_hrs_multi_letter;"
Set CheckForRecords = CurrentDb.OpenRecordset(sql, DB_OPEN_DYNASET)
When I use the following code, the error "RunTime Error 3061 Too Few Parmeters" is displayed. When I run the query from the database window, it executes without error.
Any guidance would be appreciated.
-jackie
Below is the code:
sql = "SELECT qry_max_hrs_multi_letter.SSN FROM qry_max_hrs_multi_letter;"
Set CheckForRecords = CurrentDb.OpenRecordset(sql, DB_OPEN_DYNASET)