Hello,
what is the most easy way to prevent an error with a null value in a dlookup?
I have an field on a form that sometimes is = 0 then I get an error in the following code:
DLookup("[Date]", "Tblusers", "[user] =" & Me.lastuser & "")
Is it possible that when lastuser = 0 the text "no date" should appear and in the other case the value of dlookup?
I tried it like this:
If Not IsNull(Me.Laatsteingavefreq2) Then
Me.laatstedatumfreq2 = DLookup("[Datum]", "TblMoederrollen", "[Moederrolnummer] =" & Me.Laatsteingavefreq2 & "")
Else
Resume Next
End If
But I get an error in the resume next
Thanks in advance,
Sven.
what is the most easy way to prevent an error with a null value in a dlookup?
I have an field on a form that sometimes is = 0 then I get an error in the following code:
DLookup("[Date]", "Tblusers", "[user] =" & Me.lastuser & "")
Is it possible that when lastuser = 0 the text "no date" should appear and in the other case the value of dlookup?
I tried it like this:
If Not IsNull(Me.Laatsteingavefreq2) Then
Me.laatstedatumfreq2 = DLookup("[Datum]", "TblMoederrollen", "[Moederrolnummer] =" & Me.Laatsteingavefreq2 & "")
Else
Resume Next
End If
But I get an error in the resume next
Thanks in advance,
Sven.
Last edited: