Starchildren3317
Registered User.
- Local time
- Today, 01:28
- Joined
- Nov 30, 2010
- Messages
- 11
First - looks like I have found my new home. This site is exactly what I was looking for. Have all ready found some great tips here so thanks!
OK, now on to my question...
I have a subreport that I am using to grab the date that an order set was entered into the system. The issue is that the same order set can have multiple entered days until all of the samples belonging to the order set have been entered.
However, I am only interested in the very first date entered.
Here is what I have:
Now when I run this query it works fine, I only get a single date - the first date entered.
However, when I run the report that this subreport belongs it gives me every date entered.
I have the links properly set for the subreport - linked by OrderID
Also, I should mention that the EnteredDate field is actually a date / time field. This is why I have concatenated the date because I only want the m/d/y. When there are mulitple Times entered but in the same day, I will only get one entered date. However, if there are multiple days entered that is when the report (not the query) gives the multiple entered dates.
Any tips would be much appreciated! Thanks!
OK, now on to my question...
I have a subreport that I am using to grab the date that an order set was entered into the system. The issue is that the same order set can have multiple entered days until all of the samples belonging to the order set have been entered.
However, I am only interested in the very first date entered.
Here is what I have:
Code:
SELECT DISTINCT TOP 1 DatePart("M",[EnteredDate]) & "/" & DatePart("D",[EnteredDate]) & "/" & DatePart("YYYY",[EnteredDate]) AS EnterDate, Results.OrderID
FROM Results
Now when I run this query it works fine, I only get a single date - the first date entered.
However, when I run the report that this subreport belongs it gives me every date entered.
I have the links properly set for the subreport - linked by OrderID
Also, I should mention that the EnteredDate field is actually a date / time field. This is why I have concatenated the date because I only want the m/d/y. When there are mulitple Times entered but in the same day, I will only get one entered date. However, if there are multiple days entered that is when the report (not the query) gives the multiple entered dates.
Any tips would be much appreciated! Thanks!