Query Total Date

AdamQuestion

New Member
Joined
Jan 17, 2006
Messages
46
Hello,

I am sure this is simple but I cannot find an existing thread.

I have a query where I display a list of steps(details) to several projects and a Due date and completed date. The Due date is a required field and the completed date is not. My query is set to Totals and it finds the Last Due Date out of the steps no problem. I am also looking to find the Last Completed Date but I want it to display a blank field if there is no date listed in one of the steps for a specific project. Any help would be appreciated.

Thank You

SELECT tbl_Details.DataID, Last(tbl_Details.DueDate) AS LastOfDueDate, Last(tbl_Details.CompDate) AS LastOfCompDate
FROM tbl_Details
GROUP BY tbl_Details.DataID;
 

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
5,071
Office Version
2019
Platform
Windows
I think that you want to remove the "last" criteria from the completed field.
 

AdamQuestion

New Member
Joined
Jan 17, 2006
Messages
46
The user would enter several steps (details) for a given project and they would place in a field when they completed that step. I would like the query to display the latest completed date. However, if the project has not been completed (all completed date fields filled in) I would like to display nothing.
 

Forum statistics

Threads
1,081,516
Messages
5,359,232
Members
400,523
Latest member
ExcelNewbie98

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top