Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query - Obtaining Specific Dates

Status
Not open for further replies.

StateGov

Programmer
Oct 22, 2002
17
0
0
US
Can anyone tell me how I would add information to a query that would allow me obtain the LastUpdate to a particular field. I.E. I have a database where a user updates particular estimates, however, all estimates are retained in this dbase...I would like to pull out the last date for a particular update. I have tried DMax, however, it just applied today's date to the field. Any thoughts on this?

Any assistance would be greatly appreciated.
 
What did your DMax statement look like? Also, how is the date field in your Table set up.

Paul
 
The data that appears in the field appears as below:

4/2/2001 11:16:04 AM

The query statement is as follows:

Last Update: DMax("[Last_Update]","dbo_tbl_Project_Estimate") or Last Update:
DMin("[Last_Update]","dbo_tbl_Project_Estimate")

When using DMax, 10/21/2002 1:54:36 PM is the returned data

When using Dmin, 1/2/1997 is the returned data

These are only some of the dates that reside in this dbase. This date varies and I am attempting to pull the earliest entry date for each record and the latest entry dates (sep. queries of course).

Any suggestions?
 
Can you create a Totals query that uses some value in the Record, like OrderNumber, and Group's By that number and then add the DateField twice and set the Totals line for Max on one and Min on another. This should give you the values you want. It will really depend on whether you can come up with a Field to Group By.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top