Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Dim strVal As String
Set dbs = CurrentDb()
strSQL = "SELECT * FROM tblName WHERE Field1 = 'condition' "
Set rs = dbs.OpenRecordSet(strSQL, dbOpenSnapshot
With rs
Do Until rs.EOF
strVal = .Fields(x).Value
strSQL = "DELETE * FROM tblName2 WHERE FieldX = '"
strSQL = strSQL & strVal & "'"
DoCmd.RunSQL strSQL
.MoveNext
Loop
End With
Set rs = Nothing
Set dbs = Nothing