473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Pull data last entered by date/time stamp Access 2003

I have a database that we use in our department for the status of our projects. In the form when you pick a project from the dropdown list I have a subform that pulls the data entered for the following week. I was able to do this by having when they input data it automatically pulls the date for week ending by this: =DateAdd("d",6-Weekday(Date()),Date()),
so therefore to see previous weeks data the subform date field has this: =DateAdd("d",-7,[Forms]![Enter Status for New Week Data]![DateOfWeekEnding])
Because they may have changes to make within that week to what they already input I would like for them to be able to pull last entered data for that certain project instead of the previous weeks. I have added a datetime stamp field to the subform but can not figure out what the criteria would be to have it read the last one entered. Can anyone help me with this?
Thanks
Apr 2 '07 #1
5 3916
MMcCarthy
14,534 Expert Mod 8TB
Not sure exactly what you're asking but does this work?
Expand|Select|Wrap|Line Numbers
  1. =Max([Forms]![Enter Status for New Week Data]![DateOfWeekEnding]) 
Mary
Apr 2 '07 #2
Well what I ended up doing was putting a query together that the report is reading from and so for the datetimestamp I grouped by Max then had it go in descending order. That way I bring the last entry to the top per each project description. However it is still bringing every record into the table. How do I only bring in the last entered record per project description?

Not sure exactly what you're asking but does this work?
Expand|Select|Wrap|Line Numbers
  1. =Max([Forms]![Enter Status for New Week Data]![DateOfWeekEnding]) 
Mary
Apr 3 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Well what I ended up doing was putting a query together that the report is reading from and so for the datetimestamp I grouped by Max then had it go in descending order. That way I bring the last entry to the top per each project description. However it is still bringing every record into the table. How do I only bring in the last entered record per project description?
Post the SQL of the query you are currently using.
Apr 3 '07 #4
There are a lot of fields in this query. Here is what I want though. I want it to pull the last record entered for a specified Date of Week Ending for all current projects:
SELECT Max(Status_Fields.DateTimeStamp) AS MaxOfDateTimeStamp, Status_Fields.Date_Of_Week_Ending, Status_Fields.Master_Project_Name, Status_Fields.Status_Description, Status_Fields.Supervisor, Status_Fields.Description_Name1, Status_Fields.Description_Name2, Status_Fields.Description_Name3, Status_Fields.Description_Name4, Status_Fields.Description_Name5, Status_Fields.Summary_Rating, Status_Fields.Status_for_Week_Ending, Status_Fields.Next_Milestone, Status_Fields.Next_Steps, Status_Fields.ImagePath
FROM Status_Fields
GROUP BY Status_Fields.Date_Of_Week_Ending, Status_Fields.Master_Project_Name, Status_Fields.Status_Description, Status_Fields.Supervisor, Status_Fields.Description_Name1, Status_Fields.Description_Name2, Status_Fields.Description_Name3, Status_Fields.Description_Name4, Status_Fields.Description_Name5, Status_Fields.Summary_Rating, Status_Fields.Status_for_Week_Ending, Status_Fields.Next_Milestone, Status_Fields.Next_Steps, Status_Fields.ImagePath
ORDER BY Max(Status_Fields.DateTimeStamp) DESC;


Post the SQL of the query you are currently using.
Apr 3 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
Try this ...

Expand|Select|Wrap|Line Numbers
  1. SELECT Status_Fields.Master_Project_Name,
  2. Max(Status_Fields.DateTimeStamp) AS MaxOfDateTimeStamp,
  3. First(Status_Fields.Date_Of_Week_Ending),
  4. First(Status_Fields.Status_Description), 
  5. First(Status_Fields.Supervisor), 
  6. First(Status_Fields.Description_Name1),
  7. First(Status_Fields.Description_Name2), 
  8. First(Status_Fields.Description_Name3), 
  9. First(Status_Fields.Description_Name4),
  10. First(Status_Fields.Description_Name5), 
  11. First(Status_Fields.Summary_Rating),
  12. First(Status_Fields.Status_for_Week_Ending),
  13. First(Status_Fields.Next_Milestone), 
  14. First(Status_Fields.Next_Steps), 
  15. First(Status_Fields.ImagePath)
  16. FROM Status_Fields
  17. GROUP BY Status_Fields.Master_Project_Name 
  18. ORDER BY Max(Status_Fields.DateTimeStamp) DESC;
Apr 3 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Don | last post by:
Hi all, With regards to the following, how do I append the datetimestamp to the filenames in the form? The files are processed using the PHP script that follows below. Thanks in advance,...
2
by: Bert | last post by:
I would like to store a Date/Time stamp in a SQL tabel Now only the Date is stred and not the time. How to I get the time also This is the code (There is more, but that works) atSQLexe ex=new...
2
by: Cheekie | last post by:
I have an Access table that has a Date/Time stamp. I am only looking for records that are either before 8am or after 10pm....is there anyway to query or break this data out?
3
by: MarcJoseph | last post by:
I have a database that is shared my multiple users who enter and update records on a weekly basis. Is there a way I can add a field to my main data table that will automatically generate the...
1
by: Susan Bricker | last post by:
Greetings. I have a report (actually all of my reports in an MDB) that I want to date/time stamp at the bottom. Previously, I had used the builtin function of Now(). I thought that would give...
4
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form...
6
by: trytobreak | last post by:
Hi All, I am a network administrator in a fairly large software company and I would like to write myself a small utility, which would connect (one by one) to all machines on the network and get...
1
by: 6afraidbecause789 | last post by:
Hi - I am using a Date/Time Picker popup form for users to choose a a date and time for use on a separate entry form. The date/time on the entry form is actually entered automatically as a...
1
by: mcgr0199 | last post by:
How do I separate a date/time stamp in Access 2007? I need to be able to query for certain times of day over a period of 120 days (i.e. create a query that only gives me the data for 1pm,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.