Results 1 to 4 of 4
  1. #1
    Ivy is offline Novice
    Windows 11 Access 2019
    Join Date
    Oct 2024
    Posts
    2

    Question Latest employee profile based on most recent date


    Hi, I have a problem with the most recent dates.


    I have a database for an employee archive and I would like to see the employee's latest profile/job in the main form and in a summary list, taking it from the subform/other table.


    If the end date (field name "DataFine") is empty, it means that the employee is still active and therefore this is certainly his most recent profile/job. Furthermore, if DataFine is empty I would like the date to be far in the future, for example 01/01/2060 (so we are sure that it is necessarily the last profile, at least now in 2024).


    The problem is that in the main form it often shows me the last profile/task that is incorrect compared to the most recent date. However, it works very well if DataFine is empty (01/01/2060).

    I don't understand where the error is, if you can help me understand better.

    Post in other forums: https://www.forumexcel.it/forum/thre...recente.78980/

    FORUM_TEST.zip

    Thank you very much

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,575
    Post your DB here, zipped if need be.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Post 1 was moderated after being edited, I'm posting to trigger email notifications.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,575
    You are going to have to give some instructions on how to recreate the issue.

    Plus I do not speak/understand Italian.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. How to update past data based on most recent date.
    By Kaloyanides in forum Programming
    Replies: 7
    Last Post: 08-05-2022, 04:56 PM
  2. Populate value based on most recent date
    By Poohbear0471 in forum Forms
    Replies: 7
    Last Post: 02-15-2021, 01:25 PM
  3. Replies: 5
    Last Post: 09-30-2019, 11:30 AM
  4. Replies: 3
    Last Post: 03-11-2014, 07:32 PM
  5. Replies: 1
    Last Post: 07-23-2013, 01:39 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