I keep getting the following error when trying to use DLookup(). I have used DLookup several times before, can't really grasp why it is throwing this error...
"Run-time error '2428':
You entered an invalid argument in a domain aggregate function."
Code:
Dim varTPSel
Dim varTPName
Dim varTPAddr1
Dim varTPCity
Dim varTPState
Dim varTPZip
varTPSel = cboSelTP.Value
varTPName = DLookup("[Tp]", CollCase, "[EntityId] = '" & varTPSel & "'")
varTPAddr1 = DLookup("[Address]", CollCase, "[EntityId] = '" & varTPSel & "'")
varTPCity = DLookup("[City]", CollCase, "[EntityId] = '" & varTPSel & "'")
varTPState = DLookup("[State]", CollCase, "[EntityId] = '" & varTPSel & "'")
varTPZip = DLookup("[Zip]", CollCase, "[EntityId] = '" & varTPSel & "'")
txtTPName.Value = varTPName
txtTPAddr1.Value = varTPAddr1
txtTPCity.Value = varTPCity
txtTPState.Value = varTPState
txtTPZip.Value = varTPZip