Combining two tables querry (easy?)

Clearsky24

New member
Local time
Today, 10:49
Joined
Mar 12, 2003
Messages
8
Howdy all, any help appreciated.
Ok, here is what I want to do, I to make a querry that sorts all the customers and shows when there last order was. I have an customer table with a subform that is the orders table (I think that is irrelevant).

I think the important info is this.....

There are two tables involved:
Customers Table

Relevant fields from Customers table are:
CompanyName, ContactTitle, EmailAddress, PhoneNumber, FaxNumber, Systemtype

Orders Table
Relevant fields from Orders table are:
OrderDate2

So all I want to do is build a querry that list's all customers by the date of their last order. It would show that date, as well as the fields from the Customers table listed.

When I use the querry wizard it simply shows every order the customer ever ordered so I would like to somehow limit it to the last order they entered?

So I can see who hasn't been using us lately..... ? I could then have someone easily analyze and send info via fax email or phone call.
 
Last edited:
Max

Open your query in design mode.
Go to Veiw >> click on Totals

Then Go to your Oderdate2 column (down in the grid section) and where it now says group by click on Max.

This should give you each customers latest Order Date.

Hope that will do the trick...
 
On the grid I can choose:
Sort
Show
critieria
or

and sort only gives me ascending and descending
for instance we have 625 customers...... so I should have 625 results
each customer and the date of their last order.....
but instead I am getting each customer listed and every order they have ever ordered so we have like 100,000 results.

How can i get it to just show the last order.
 
ohhh I forgot to hit view ...sorry
I think we got it
I told you it was easy, thank you so much
 

Users who are viewing this thread

Back
Top Bottom