I'm trying to get some values from one table to an other. Now I select all dates from one table and I search with them in another table. When there is a record found for that date it should perform a query. But when there is nog record foud for that date is return empty. How do I compare to that??
My code for now:
Expand|Select|Wrap|Line Numbers
- Set rst = db.OpenRecordset("SELECT DISTINCT Datum FROM Longfunctie;")
- Do Until rst.EOF
- Set rst2 = db.OpenRecordset("SELECT eadnr, parameter, Waarde FROM PatParameters WHERE Datum = " & rst.Fields(0).Value & ";")
- If (IsEmpty(rst2.Fields(0).Value)) Then
- Debug.Print rst.Fields(0) & " " & rst2.Fields(0).Value & " " & rst2.Fields(1).Value & " " & rst2.Fields(2).Value
- End If
- rst.MoveNext
- Loop