Results 1 to 2 of 2
  1. #1
    mdaccess is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2015
    Posts
    1

    Date field not passing to report

    Hi There,

    I can't seem to work out why this isn't working. I have a form with a macro button to go to my customer report. The form has 2 date fields created called 'ReportStartPeriod' and 'ReportEndPeriod'. When you enter the dates and click the macro I am presented with a Parameter query box instead of my report with only people referred between these two dates???? What is really odd is that if I enter dates here the result works just fine. What is wrong with my date fields?

    Here is my WHERE condition within the macro... [ConsumerT]![ReferralDate] Between [ReportStartPeriod] And [ReportEndPeriod]

    Any advice much appreciated.

  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,652
    In a macro I think you need the full form reference. In VBA it looks like:

    http://www.baldyweb.com/wherecondition.htm
    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. passing a date from a form to a query
    By bbxrider in forum Queries
    Replies: 4
    Last Post: 12-12-2014, 05:52 PM
  2. Replies: 1
    Last Post: 12-05-2014, 01:06 PM
  3. Passing A Date Range From Form To Report
    By JeffGeorge in forum Reports
    Replies: 3
    Last Post: 03-11-2014, 12:50 PM
  4. Replies: 3
    Last Post: 05-09-2012, 04:04 PM
  5. Passing a NULL value to a date field
    By lman in forum Queries
    Replies: 2
    Last Post: 02-22-2011, 02:20 PM

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