• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 613
  • Last Modified:

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 & "*'" & "" * "")
0
thandel
Asked:
thandel
1 Solution
 
mbizupCommented:
Try this:


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

Open in new window

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now