Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Like or Instr or * or DLookup???

Status
Not open for further replies.
Aug 2, 2000
325
US
I'm not really sure how to go about achieving the desired result.

I have 2 tables. For example purposes each table has only one field. TableA!FieldA and TableB!FieldB

What I need to do is produce a recordset in which the values in TableB act as a lookup table and are used against TableA. The returned data from TableA would be Where and part of the value in FieldA matches anypart of a value in FieldB.

Does that make sense??? Any help would help a heap.
Thanks for your help in advance,

Dave
 
Okay...you have two tables...A and B. You want to start with the first item in B and look in A...if B is contained in any part of A, add A to the output. Next take the second B and do the same, and so on. Each Occurance in A, if found by more than one B, should only be displayed once.

Does this sound about right???

If so, doing it in a query may not be possible (at least I would do it this way myself!). You will have to write some VBA code to do the search and output the results....Need help with that??? No problem....give me a bit of sample data and I can help you out. Final question is where is the output going???

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top