Hello,
I have a main for that enters an address when the cmdfilter button is clicked the following code is executed:
What I do not understand is how to display the above filtered data on my subform (fsubproperties)
Thanks for any help you can provide.
I have a main for that enters an address when the cmdfilter button is clicked the following code is executed:
Code:
Private Sub FilterBrokers()
Dim db As DAO.Database
Dim rs20Mile As DAO.Recordset
Dim MileCriteria As Long
Dim qry As DAO.QueryDef, qry2 As DAO.QueryDef
Set db = CurrentDb()
Set qry2 = db.QueryDefs("ActiveAssets_SelQry")
If "RUCA_SubClass" = "A" Then
MileCriteria = 5
Else
If "RUCA_SubClass" = "B" Then
MileCriteria = 25
End If
Set qry = db.QueryDefs("Get20Mile_SelQry")
qry.Parameters("Miles_Param").Value = MileCriteria
qry.Parameters(0) = Forms![frmMain]![txtZipCode]
Set rs20Mile = qry.OpenRecordset(dbOpenDynaset)
Set rs20Mile = qry.OpenRecordset()
If Not rs20Mile.EOF Then
rs20Mile.MoveLast
rs20Mile.MoveFirst
End If
End If
End Sub
Thanks for any help you can provide.