Results 1 to 3 of 3
  1. #1
    sherrygroves is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    23

    DMin Function

    Hi!!

    I have two tables (My Notes and Reporting Dates) and input forms for each. The Reporting Dates table contains the State Names (two letter abbreviation) and report due dates for each state throughout the year. The My Notes table contains the State Names (two letter abbreviation) and general information specific to each state. My Notes has one record per state and of course the Reporting Dates table has many records per state.

    When I open the My Notes form, I want to display a field that has the Next Report Due date for that state. I have a query (Next Due Date) which has the state field from the Reporting Dates table that returns the dates I want. I am using the following statement to try to do that:

    =DMin("[Min Of Report Due Date]","Next Due Date","[Next Due Date]![State] = [Reporting]![State]")

    where Min of Report Due Date is the field in the query that holds the dates and Next Due Date is the query name. With the above statement, it returns the min due date in every record, not the min date for that particular state.

    Can someone help me?

    Thanks,


    Sherry

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Concatenate the State variable. I assume it is a text field.

    =DMin("[Min Of Report Due Date]","Next Due Date","[State] ='" & [State] & "'")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    sherrygroves is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    23
    Thank you so much!!! I have been trying to figure this out for a couple of weeks and just found this forum!!

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

Similar Threads

  1. Replies: 8
    Last Post: 01-31-2014, 01:45 PM
  2. Replies: 3
    Last Post: 04-18-2012, 07:10 AM
  3. Help with Dmin function
    By ohthesilhouettes in forum Queries
    Replies: 2
    Last Post: 06-19-2011, 02:53 AM
  4. Want function to get current function name
    By Davis DeBard in forum Programming
    Replies: 2
    Last Post: 08-13-2009, 05:02 AM
  5. function key
    By marianne in forum Access
    Replies: 5
    Last Post: 05-14-2009, 01:26 AM

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