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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting items with most recent date in subform

Status
Not open for further replies.

doctorswamp

Technical User
Jul 15, 2003
133
GB
Hi

In a subform that logs production of items in batches of different types, and their batch dates, I'd like to pick out the most recent price per item. The subform has source Batches and links via ItemID to the main form.

For a particular ItemID the subform data could look like this

Date Qty BatchType Price
1/6/06 5 S 1.25
1/12/06 7 S 1.35
6/12/06 8 P 1.20

and I'd like to pick out, for Type S, that the latest price is 1.35 with Date 1/12/06. Prices can go down as well as up.

 
You could use the Dmax-function to this.

Pampers [afro]
Keeping it simple can be complicated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top