Results 1 to 4 of 4
  1. #1
    SGrohola is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2017
    Location
    Romulus, MI
    Posts
    41

    Question Retrieving latest address to populate in Report

    Good day! I'm working on an Access 2013 database, tracking owner/operators in North America. My boss wants to be able to keep track of all address changes, so I created a table to put addresses into, and I have a one-to-many relationship back to my main table.

    I have set up a form, with several sub-forms. One sub-form is the address table, and it's set up to show multiple items. And I added a auto-populate field for date address was entered (record added = date()).



    I have created a report based off of the forms to be able to print a current record of an owner/operator. What I need is for the report to show the latest (newest) address on the report, but I'm stumped on how to make this happen. When the report populates these fields, I'm assuming it needs to go off the record added date (newest date).

    Can anyone help me with this? I would really appreciate it. I'm definitely rusty with Access as I haven't used it in a few years.

    Thanks!

  2. #2
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Use Max() on the added date field. To avoid returning two address changes in one day, include date & time in the added date field.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    hopefully, you are using an AddrID in the child table. (if not, a DateEntered field)
    you must run a MAX query, say qsRecentAddr ,on the tAddr table, get ClientID, Max(AddrID) ( or Max(DateEntered))
    now when you query your person table, add in the qsRecentAddr query, and link qsRecentAddr to the tAddr table.

  4. #4
    SGrohola is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2017
    Location
    Romulus, MI
    Posts
    41
    I'm still kind of confused. I did a MAX query on my tbl_Addresses, using the EmployeeID (which is the ID from my main table "tbl_Owner Operators"). I then ran the query, and it worked.

    Now, I want to create a new query, but do I want to use my tbl_Addresses, or tbl_Owner Operators" to make the connection to the MAX query? And, if it's the "tbl_Owner Operators", how do I add the addresses in? When I tried it, I used the tbl_Addresses to make the connection to "qry_Latest Address", but when I ran it, it brought in all the addresses again? So, I'm thinking I need to use "tbl_Owner Operators", but then, there are no addresses. And when I use the query to run the report "rpt_Owner Operators", how do I get just latest address to appear? Sorry for all the questions. I understand most of it, but it's been so long since I really created a database (Access 2003), and I'm not a programmer, so I struggle with certain aspects.

    Thank you!

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

Similar Threads

  1. Replies: 7
    Last Post: 06-27-2016, 12:28 PM
  2. Replies: 1
    Last Post: 05-01-2014, 11:37 AM
  3. Getting only latest date info into a report
    By fshrago in forum Reports
    Replies: 1
    Last Post: 10-18-2013, 02:29 AM
  4. Replies: 1
    Last Post: 08-31-2012, 01:47 PM
  5. Latest Transaction Report
    By Worm in forum Reports
    Replies: 3
    Last Post: 08-16-2010, 06:10 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