Dlookup returning null

I have a table tMHFrame and in that tabel is a string for "Frame".  A value of frame could be something like "Rikki A12*" or "Rikki A12"

A user selects a frame from this table but on the form the only part of the model is used and the reset is stipped to only use the value of "Rikki" and drop the remaing "AXXXXX" values.

I would like to see if a user entered value (dFrameModel, which in this case would be "Rikki" ) is also in the table AND if that value in the table contains an "*" at the end.

This Dlookup is always returning null.  Any idea why?  So I'm basicaly trying to search in the table for "Rikki*" & "*"

sTest = DLookup("Frame", "tMHFrame", "Frame='" & dFrameModel & "*'" & "" * "")
Who is Participating?
mbizupConnect With a Mentor Commented:
Try this:

sTest = DLookup("Frame", "tMHFrame", "Frame LIKE '" & dFrameModel & "*' AND Right(Frame,1) ='*'") 

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.