Using wildcard in DMIN

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Use this
NewStatusDate: DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart]
Like '*" & [CombinePart] & "*'")
 
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
 
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
 
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
 
Back
Top