Results 1 to 4 of 4
  1. #1
    Compufreak is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    70

    Default earliest date and latest

    Hi



    i have did some research with regards to this

    i would like for my report for default to the earliest and latest date ,should the user not select a start date and end date.

    i have read about using MIN and MAX , but i am not sure how this would work.

    please help

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    Google ms access min max functions techonthenet for a dscription of the functions and sample usage

  3. #3
    Compufreak is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    70
    Code:
    If IsNull(Combo1.Value) And (([StartDate] <> " ") Or ([EndDate] <> " ")) And IsNull(Combo53.Value) Then
                    
                       strSQL = strSQL & " " & "WHERE [Day_Month_Year] Between #" & [StartDate] & "# AND #" & [EndDate] & "#" & ";"
    N.B: Above code is in vba

    i would just like to know , how will i be able to pull the minimum and maximum dates if the user does not select any from the form.

    also i am displaying the dates on the report , it works fine when i select a date .... but i am just puzzled by this MIN and MAX functionality.

    i know its simple as i can't seem to find a proper solution that will help.

    thanks again for the assistance

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725

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

Similar Threads

  1. Replies: 1
    Last Post: 02-17-2012, 04:43 PM
  2. Selecting Earliest and latest date
    By kstyles in forum Queries
    Replies: 10
    Last Post: 12-31-2010, 03:04 PM
  3. How do you get the latest date?
    By radicrains in forum Queries
    Replies: 6
    Last Post: 10-27-2010, 08:59 PM
  4. Query to find latest date
    By Lockrin in forum Access
    Replies: 2
    Last Post: 12-16-2009, 10:00 AM
  5. Latest Date Records
    By Rick West in forum Queries
    Replies: 1
    Last Post: 09-25-2009, 11:16 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