Using wildcard in DMIN

G

Guest

I have the following expression in a query, which is not quite working the
way I want:

NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] =
'" & [CombinePart] & "'")

I'm trying to return the earliest LeadTimeDate where the text in CombinePart
is included in the text in a CombinePart on another row. I think I'm missing
a wild card????

For example:
CombinePart LeadTimeDate NewStatusDate
11- 3/1/05 1/1/05
11-22-33 1/1/05 1/1/05
11-22-33-44 5/1/05 4/1/05
11-22-33-44-55 4/1/05 5/1/05

Thank you
 
G

Guest

Use this
NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like '*" & [CombinePart] & "*'")
 
G

Guest

Thanks Dennis, this worked great, although now I think I need it without the
first wildcard. I have a heck of a time trying to figure out whether or not
to use single or double quotes. What I need is NewStatusDate:
DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like & [CombinePart] & "*'") and I keep getting an error msg. Can you tell
me how to write this without the first "*".

Thank you so much


Dennis said:
Use this
NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like '*" & [CombinePart] & "*'")

Alex said:
I have the following expression in a query, which is not quite working the
way I want:

NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] =
'" & [CombinePart] & "'")

I'm trying to return the earliest LeadTimeDate where the text in CombinePart
is included in the text in a CombinePart on another row. I think I'm missing
a wild card????

For example:
CombinePart LeadTimeDate NewStatusDate
11- 3/1/05 1/1/05
11-22-33 1/1/05 1/1/05
11-22-33-44 5/1/05 4/1/05
11-22-33-44-55 4/1/05 5/1/05

Thank you
 
D

Duane Hookom

Just remove the first "*"
NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like '" & [CombinePart] & "*'")

--
Duane Hookom
MS Access MVP


Alex said:
Thanks Dennis, this worked great, although now I think I need it without
the
first wildcard. I have a heck of a time trying to figure out whether or
not
to use single or double quotes. What I need is NewStatusDate:
DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like & [CombinePart] & "*'") and I keep getting an error msg. Can you
tell
me how to write this without the first "*".

Thank you so much


Dennis said:
Use this
NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like '*" & [CombinePart] & "*'")

Alex said:
I have the following expression in a query, which is not quite working
the
way I want:

NewStatusDate:
DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] =
'" & [CombinePart] & "'")

I'm trying to return the earliest LeadTimeDate where the text in
CombinePart
is included in the text in a CombinePart on another row. I think I'm
missing
a wild card????

For example:
CombinePart LeadTimeDate NewStatusDate
11- 3/1/05 1/1/05
11-22-33 1/1/05 1/1/05
11-22-33-44 5/1/05 4/1/05
11-22-33-44-55 4/1/05 5/1/05

Thank you
 
G

Guest

Perfect! Leave it to me to make it so difficult. Thank you

Duane Hookom said:
Just remove the first "*"
NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like '" & [CombinePart] & "*'")

--
Duane Hookom
MS Access MVP


Alex said:
Thanks Dennis, this worked great, although now I think I need it without
the
first wildcard. I have a heck of a time trying to figure out whether or
not
to use single or double quotes. What I need is NewStatusDate:
DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like & [CombinePart] & "*'") and I keep getting an error msg. Can you
tell
me how to write this without the first "*".

Thank you so much


Dennis said:
Use this
NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like '*" & [CombinePart] & "*'")

:

I have the following expression in a query, which is not quite working
the
way I want:

NewStatusDate:
DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] =
'" & [CombinePart] & "'")

I'm trying to return the earliest LeadTimeDate where the text in
CombinePart
is included in the text in a CombinePart on another row. I think I'm
missing
a wild card????

For example:
CombinePart LeadTimeDate NewStatusDate
11- 3/1/05 1/1/05
11-22-33 1/1/05 1/1/05
11-22-33-44 5/1/05 4/1/05
11-22-33-44-55 4/1/05 5/1/05

Thank you
 

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