using wildcards in dlookup

A

Alex

I have a colum containing the following:

row tag date
1 111- 1/5/05
2 222- 2/6/05
3 222-111 2/8/05
4 222-111-333 11/5/04
5 222-111-333-444 9/5/04

I'm trying to use a dlookup formula in an expression in another column in
the query that will give me the earliest date of either the same row or a row
that contains a tag that has the same beginning characters. For example, row
5 would look at row 5, 4, 3, & 2 and row 3 would look at row 2.

I can successfully create a dlookup formula to to retrieve the earlies date
from the entire table Date column, but I'm having trouble with the criteria
portion of the dlookup syntax.

Any ideas?

Thank you much
 
A

Alex

This will help a lot; thanks so much.

I'm still confused though, on how to define my group. In the example you
linked me to, records are grouped by BookID, which are all the same. I need
to group by Tags that contain the same beginning characters. For example:
Row 2 would be in a group with row 3, 4, & 5. Row 3 would be in a group with
rows 4 & 5. Row 6 would be in a group by itself. (my examples in my first
email below are incorrect; sorry, it was getting later in the day)

I've tried to use Like in the criteria row in the query grid in Tag field,
which is grouped, but keep getting error messages.

I really appreciate your help on this; I'm just stumped.


row tag date6 333-111-333-444-555 10/2/04
 
A

Alex

Maybe this will help:

My SQL is the following. I'm just not getting the Like part correct.

SELECT DLookUp("Min([Date])","[Query1]","Like [Tag] & "*"") AS NewDate
FROM Query1;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top