You would need to provide the value of the parameter to the query before you
open the recordset. This is commonly done in code.
However, for your situation, I would not open a recordset. Instead, I would
use the DCount function to test the query. Much simpler code.
If DCount("*", "qryGroupSearchResults") > 0 Then
DoCmd.OpenForm "frmGrpSearchResults"
Else
MsgBox "There are no subscribers currently using group #: " &
Me.cmbGrpSearch, vbInformation, "No Data Found!"
End If

Signature
Ken Snell
<MS ACCESS MVP>
>I have some simple code that tests the result of a query before opening a
> form with those results...
[quoted text clipped - 32 lines]
>
> What should I do to fix it?
jonefer - 03 Mar 2005 23:55 GMT
That was a much simpler option to the other one.
Thank you.
> You would need to provide the value of the parameter to the query before you
> open the recordset. This is commonly done in code.
[quoted text clipped - 45 lines]
> >
> > What should I do to fix it?