Matching the first part of a field

  • Thread starter Thread starter swichman
  • Start date Start date
S

swichman

I am attempting to write a dlookup statement to match only part of a
text field in the where clause. For instance I have a TkNumber text
field with data T2.GC.01 and T2.CO.01 etc. T2.GC implies General
Conditions and T2.CO implies Change Order. It is always the case that
the implication can be found in the first 4 letters. Is there a way to
make this part of a where clause in the dlookup statement or does
somebody have a better way of doing this?? Sorry to be vague but I am
having a hard time explaining this. If anybody can help it would be
much appreciated. No free trips to the Bahamas this time though.
 
Dlookup returns one value. If there are more than one T2.GC s, then it will
return the first one it finds. I know you know how to do dlookups (from
your previous posts) so what is it you want returned?
 
Dlookup returns one value. If there are more than one T2.GC s, then it
will
return the first one it finds. I know you know how to do dlookups
(from
your previous posts) so what is it you want returned?

Thanks Damon,
I have a report with a TkNumber header. I want a lookup text box that
displays for instance General Conditions for header T2.GC.01 and
T2.GC.02 etc. The lookup data is found in a separate table where T2.GC
is TopTkNumber text field and General Conditions is Description text
field. Hope this makes sense.
Thanks for any help.
 
No, it doesn't make sense. You are creating a report based on TkNumbers?
On the report you want a text box that shows General Conditions for each of
the Headers? Why not use a SQL statement as your Report's source, and join
the fields needed there? Then you can have the General Conditions field
tied to the TkNumber. Is there more than one table? Is there a relationship
between the tables?
 
Back
Top