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

Query to return last known date with details from different table

Status
Not open for further replies.

KLewisBPM

Technical User
Jan 11, 2002
294
GB
I have 2 tables I have linked by vendor number. Table 1 is called Vendor Table 2 is called Vendor ledger entry. I have created a query that reports all vendor fields and just the posting date field from the vendor ledger entry table.

Everytime a date appears against the vendor it reports that date and also all details from the vendor card. All i want the query to do is to report the last posting date. so that it gives me the vendor details just once and not for every posting date against that vendor.

Vendor details from Vendor Table plus the last known posting date from the vendor ledger entry table. Sounds simple. but i'm struggling.

Any help would be much appreciated. Kind Regards

Kelley Lewis
 
Rather than use a query to join in the Ledger Entry table, if all you need is the last posting date try the DMax function- something like Dmax("PostingDate","LedgerEntry","VendorNumber = " & [VendorNumber]). You could also create a query based on the Ledger Entry table that returns the latest posing date and then join that into your existing query instead of the Ledger Entry table. Hope this helps...
 
Im actually using Microsoft query to create it because Im trying to export the data into excel. the query editor and criteria's are the same as access. Kind Regards

Kelley Lewis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top