Using wildcards in DMin formula

G

Guest

I'm trying to return the earliest LeadTimeDate of a record if other
CompareParts have the same beginning characters.

The following control expression works fine:
=DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] =
Forms![NormalizeTest]![CombinePart]")

I need something like the below control expression to return the earliest
LeadTimeDate of all records with the beginning characters. I've tried
everything and can't seem to use the wildcards within this formula. Any idea
how I can rewrite this?
=DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] = Like "*
Forms![NormalizeTest]![CombinePart]"")

Thanks so much,
Alex
 
F

fredg

I'm trying to return the earliest LeadTimeDate of a record if other
CompareParts have the same beginning characters.

The following control expression works fine:
=DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] =
Forms![NormalizeTest]![CombinePart]")

I need something like the below control expression to return the earliest
LeadTimeDate of all records with the beginning characters. I've tried
everything and can't seem to use the wildcards within this formula. Any idea
how I can rewrite this?
=DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] = Like "*
Forms![NormalizeTest]![CombinePart]"")

Thanks so much,
Alex
Try:

"[CombinePart] Like '" & Forms![NormalizeTest]![CombinePart] & "*'")
 
D

Douglas J. Steele

fredg said:
I'm trying to return the earliest LeadTimeDate of a record if other
CompareParts have the same beginning characters.

The following control expression works fine:
=DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] =
Forms![NormalizeTest]![CombinePart]")

I need something like the below control expression to return the earliest
LeadTimeDate of all records with the beginning characters. I've tried
everything and can't seem to use the wildcards within this formula. Any
idea
how I can rewrite this?
=DMin("[LeadTimeDate]","NormalizationQuery","[CombinePart] = Like "*
Forms![NormalizeTest]![CombinePart]"")

Thanks so much,
Alex
Try:

"[CombinePart] Like '" & Forms![NormalizeTest]![CombinePart] & "*'")

Or, since he seems to want the wild card at the beginning,

"[CombinePart] Like '*" & Forms![NormalizeTest]![CombinePart] & "'")
 

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