i seem to be having real issues with creating record sets.
it started yesterday with an sql that had a date range. i thought that it was something to do with the sql.
but then today i am trying something more simple.
i am getting an error that is very annoying as the error will not let me close access down normally so i have to end task in task manager
errors:
3061. too few parameters. expected 1
91 object variable or with block variable set
i havent a clue what these mean but the record set is pasted below
any help please
it started yesterday with an sql that had a date range. i thought that it was something to do with the sql.
but then today i am trying something more simple.
Code:
SELECT tblReportListOptions.ActualReportName AS ChosenReport, tblReportListOptions.ID FROM tblReportListOptions WHERE (((tblReportListOptions.ID)=[Forms]![rptReportsMainScreen]![txtChosenReport]));
i am getting an error that is very annoying as the error will not let me close access down normally so i have to end task in task manager
errors:
3061. too few parameters. expected 1
91 object variable or with block variable set
i havent a clue what these mean but the record set is pasted below
Code:
Dim rs As DAO.Recordset
On Error GoTo Err_Proc
Set rs = CurrentDb.OpenRecordset("SELECT tblReportListOptions.ActualReportName AS ChosenReport, tblReportListOptions.ID FROM tblReportListOptions WHERE (((tblReportListOptions.ID)=[Forms]![rptReportsMainScreen]![txtChosenReport]));")
If rs.RecordCount <> 0 Then
DoCmd.OpenReport rs.Fields("ChosenReport")
End If
Exit_Proc:
rs.Close
Set rs = Nothing
Exit Sub
Err_Proc:
MsgBox Err.Number & " " & Err.Description
Resume Exit_Proc
any help please