Code:
Dim RST2 As Recordset
Set RST2 = CurrentDb.OpenRecordset("SELECT * FROM Stopcode", dbOpenDynaset)
RST2.MoveLast
Do
If (RST2("ID") = Me![ID]) Then
If (RST2("Krediet") = 1 Or RST2("Stopcode") = 1) Then
MsgBox "Deze klant dient CASH te betalen! " & IIf(RST2("Veld90") <> "", "(" & RST2("Veld90") & ")", "")
End If
Exit Do
End If
RST2.MovePrevious
Loop While (Not RST2.BOF)
RST2.Close