Results 1 to 2 of 2
  1. #1
    MMcKenna is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    2

    Using expression builder to find lowest date

    I have a small database that contains our suppliers. Each supplier main form has a subform that lists their certifications. Each certification has a valid until date. What I am trying to do is pull out the date that is ending soonest and using it as a recall date, keep in mind that there could be no certification and dates or there could be many, depending on the supplier. I have been able to do this with a query but I cannot get it to populate a textbox on the supplier main form. Below is my query that gives me the results I want. How do I get these results into a textbox? Can I accomplish this with expression builder? I would appreciate any thoughts.

    Code:
    SELECT TOP 1 [3rdPartyList].CertEndDate
    FROM 3rdPartyList
    WHERE ((([3rdPartyList].SupplierRecord)=[Forms]![Primary]![SupplierRecord]))
    ORDER BY [3rdPartyList].CertEndDate;
    Thank you for your help,



    Matt

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Does this work as a control source?

    =DMin("CertEndDate", "3rdPartyList", "SupplierRecord=" & [Forms]![Primary]![SupplierRecord])

    which assumes a numeric data type for SupplierRecord.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. expression builder
    By tonyl in forum Access
    Replies: 3
    Last Post: 11-26-2011, 12:00 AM
  2. Expression Builder or VB ... Help
    By Adynn in forum Access
    Replies: 0
    Last Post: 06-03-2011, 09:51 AM
  3. Query to find lowest value
    By AccessNubie in forum Access
    Replies: 3
    Last Post: 11-30-2009, 07:54 AM
  4. Replies: 1
    Last Post: 10-06-2009, 02:00 AM
  5. Expression Builder
    By mistaken_myst in forum Access
    Replies: 2
    Last Post: 05-07-2008, 01:30 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums