Hi,
I have the following DLookUp codes in one of form:
varName = DLookup(“[Name]”, “table”, “[Invoice#] = ” & Me.[Invoice#])
If Not IsNull(varName) Then
Me.Name = varName
End If
varDate = DLookup(“[Date]”, “table”, “[Invoice#] = ” & Me.[Invoice#])
If Not IsNull(varDate) Then
Me.Date = varDate
End If
But I don’t know if I add the varName codes, I will get this error message:Run-time error ‘2135’: THis property is read-only and can’t be set.
However, if I only have varDate and then the codes works well.
Any idea?
Thanks in advance.