Link to home
Start Free TrialLog in
Avatar of Shawn
ShawnFlag for Canada

asked on

DMin refresher

I am trying to look up the oldest order a member made to update the member table but need a refresher.

Here's what I have:
t: DMin("DeliveryDate","tblTranslationContractHistory","[tblTranslationContractHistory]![ContactID] = [tblTranslationContractMembers]![ContactID] ")

The sql error is can't find the name tblTranslationContractMembers.ContactID

Any ideas to fix my a lib syntax?
Avatar of jerryb30
jerryb30
Flag of United States of America image

Can you give the full context of the query?
SOLUTION
Avatar of jerryb30
jerryb30
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shawn

ASKER

note quite.

Here is a query which works but it is a groupby query qhich doesn't work to update. I need the equivalent with dmin.

SELECT tblTranslationContractMembers.DateStart, tblTranslationContractMembers.ContactID, Min(tblTranslationContractHistory.DeliveryDate) AS MinOfDeliveryDate
FROM tblTranslationContractHistory INNER JOIN tblTranslationContractMembers ON tblTranslationContractHistory.ContactID = tblTranslationContractMembers.ContactID
GROUP BY tblTranslationContractMembers.DateStart, tblTranslationContractMembers.ContactID;
Just to save me some time, can you post a sample db with some dummy data?
And, maybe what you are trying to update.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shawn

ASKER

wow  datAdrenaline, you knocked it out of the park. Nice.

I also got this to work but I like your query.

DMin("DeliveryDate";"tblTranslationContractHistory";"ContactID=" & [contactID])