Results 1 to 4 of 4
  1. #1
    Grooz13 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    97

    Unhappy Open a report with a date condition

    Ok i have a report with all kinds of field and one of them is a date field



    the date field is used to tell me when to start the production of an item
    I have a calendar and when I clique on a date i use this code

    Code:
     
    Dim DateJ as Date
     
    If (Me("Day" & i).value <> "") then
     
    DateJ = DateStart + i -1
     
    DoCmd.OpenReport "R_Production", acviewReport,,"Date_Prod_Start" & DateJ, , Cstr(i)
     
    End If
    and my Report opens... but he is always empty and my filter got the right date it's written : Filter : Date_Prod_Start=2010-08-02(todays date for exemple)
    what did I do wrong ?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If it's a date field, the syntax is slightly different:

    BaldyWeb wherecondition

    Also, unless it's a typo you don't have the "=" in there.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Grooz13 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    97
    thx a lot ! the # worked !

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help, and welcome to the site by the way!
    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. Button to open a Report
    By 95DSM in forum Reports
    Replies: 1
    Last Post: 07-09-2010, 11:11 AM
  2. Replies: 5
    Last Post: 06-19-2010, 07:55 PM
  3. Report won't open
    By okakopa in forum Reports
    Replies: 1
    Last Post: 05-24-2010, 04:09 AM
  4. Open Report or Form depending on condition
    By jheintz57 in forum Forms
    Replies: 5
    Last Post: 03-12-2010, 08:16 PM
  5. Highlighting Report Data Based on a Condition
    By KramerJ in forum Reports
    Replies: 1
    Last Post: 05-29-2009, 10:27 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