G
Guest
I have some simple code that tests the result of a query before opening a
form with those results...
This has previously worked with no problems... however, what I'm doing
differently in this instance is that the query I'm testing is getting its
parameter from a combo box on a form (cmbGrpSearch). Is this why I'm getting
the following error:
"Run time Error 3061 Too Few Parameters. Expected 1"
when I run the following code:
'==============================================
Dim db As DAO.Database
Dim rsChk As DAO.Recordset
Set db = CurrentDb
Set rsChk = db.OpenRecordset("qryGroupSearchResults", dbOpenForwardOnly)
With rsChk
If Not .EOF And Not .BOF Then
DoCmd.OpenForm "frmGrpSearchResults"
Else
MsgBox "There are no subscribers currently using group #: " &
Me.cmbGrpSearch, vbInformation, "No Data Found!"
End If
End With
Set rsChk = Nothing
'=================================================
What should I do to fix it?
form with those results...
This has previously worked with no problems... however, what I'm doing
differently in this instance is that the query I'm testing is getting its
parameter from a combo box on a form (cmbGrpSearch). Is this why I'm getting
the following error:
"Run time Error 3061 Too Few Parameters. Expected 1"
when I run the following code:
'==============================================
Dim db As DAO.Database
Dim rsChk As DAO.Recordset
Set db = CurrentDb
Set rsChk = db.OpenRecordset("qryGroupSearchResults", dbOpenForwardOnly)
With rsChk
If Not .EOF And Not .BOF Then
DoCmd.OpenForm "frmGrpSearchResults"
Else
MsgBox "There are no subscribers currently using group #: " &
Me.cmbGrpSearch, vbInformation, "No Data Found!"
End If
End With
Set rsChk = Nothing
'=================================================
What should I do to fix it?