Right, i solved it myself with a little workaround.
For future reference ill explain how i combined my filter and the recordset.
Code:
'Check if my controls (PostCode and Radius) are not empty
If Me.FilterPostCode <> "" And Me.FilterStraal <> "" Then
'Open the query that calculates distances from the postCode, FilterStraal limits the outcome of the query
DoCmd.OpenQuery ("Distance")
Dim strSQL As String
'Insert the PostCodes from the query into a table
strSQL = "Insert into tblSelectedPostCodes(Postcode) Select PC2.Postcode from Distance"
DoCmd.RunSQL strSQL
'Select the postcodes and checkmark (MailingTemp) them in the database
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strPostCode As String
Dim strSQL2 As String
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT DISTINCT PostCode FROM tblSelectedPostCodes", dbOpenSnapshot)
rs.MoveFirst
While rs.EOF = False
strSQL2 = ""
strPostCode = rs![PostCode] 'Get the PostCode
strSQL2 = "UPDATE tblObjecten3 SET MailingTemp = True WHERE (([PostCodeObject]) = '" & strPostCode & "');"
db.Execute strSQL2
rs.MoveNext
Wend
End If
rs.Close
Set rs = Nothing
Set db = Nothing
'Let Access know you want to filter records
FilterForm
Next ill filter multiple criteria , amongst wich the checkmarked records from the recordset.
Code:
Dim strFilter As String
Dim blnFilter As Boolean
blnFilter = False
strFilter = " 1=1 "
If Me.filterplaatsnaam <> "" Then
strFilter = strFilter + " and plaatsnaamobject like '" & filterplaatsnaam & "*'"
blnFilter = True
End If
If Me.fldFilterObject <> "" Then
strFilter = strFilter + " and NaamObject like '" & fldFilterObject & "*'"
blnFilter = True
End If
If Me.kzlFlterObject <> "" Then
strFilter = strFilter + " and SoortObject like '" & kzlFlterObject & "*'"
blnFilter = True
End If
If Me.FilterPostCode <> "" And Me.FilterStraal <> "" Then
strFilter = strFilter + " and MailingTemp = True"
blnFilter = True
End If
If Me.filtertrefwoord <> "" Then
strFilter = strFilter + " and (plaatsnaamobject like '*" & filtertrefwoord & "*'" _
& "OR NaamObject like '*" & filtertrefwoord & "*'" _
& "OR SoortObject like '*" & filtertrefwoord & "*'" _
& "OR ContactpersoonLocatie like '*" & filtertrefwoord & "*'" _
& "OR AdresObject like '*" & filtertrefwoord & "*' " _
& "OR PostcodeObject like '*" & filtertrefwoord & "*'" _
& "OR BijzonderhedenObject like '*" & filtertrefwoord & "*')"
blnFilter = True
End If
If blnFilter Then
Me.Filter = strFilter
Else
Me.Filter = "1=2"
End If
Me.FilterOn = True
This way i can filter and combine basicly everything : Sort, City, Adres, Contactname, and radius from postcode. (using GreatCircle module found online)