Results 1 to 2 of 2
  1. #1
    fshrago is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    1

    Getting only latest date info into a report

    I have created the following query which correctly returns only the fields with the latest date:

    SELECT CheckDate.CheckDateID, CheckDate.CheckDate, CheckDate.CheckDone, CheckDate.Notes, CheckDate.AptID
    FROM CheckDate INNER JOIN qryLatestCheckDate ON CheckDate.AptID = qryLatestCheckDate.AptID
    WHERE (((CheckDate.CheckDate)=[qryLatestCheckDate]![MaxOfCheckDate]));

    However, when I use this query in a Report I get an error:

    The specified field 'checkdate.checkdate' could refer to more that one field in the FROM clause of your SQL statement.

    The report was built with the report wizard, so shouldn't this correctly name the fields?



    There is a field in the report called whose source is specified as: checkdate.checkdate if I remove this field from the report, then the report correctly only gives me the information for the latest date, but only without the actual date field in the report?!

    Thanks

  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,771
    You mean there is a textbox on the report with ControlSource of CheckDate.CheckDate? Since I see only one field in the query named CheckDate, shouldn't need the tablename prefix. Either drag the CheckDate field from the field list or create textbox and select the field from the ControlSource drop down.
    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.

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

Similar Threads

  1. Value of latest date
    By v!ctor in forum Queries
    Replies: 3
    Last Post: 02-27-2013, 03:48 PM
  2. ComboBox always contain latest Monday date
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 08-30-2012, 01:33 PM
  3. Selecting Earliest and latest date
    By kstyles in forum Queries
    Replies: 10
    Last Post: 12-31-2010, 03:04 PM
  4. How do you get the latest date?
    By radicrains in forum Queries
    Replies: 6
    Last Post: 10-27-2010, 08:59 PM
  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