If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Select most recent related record from related Table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-02-12, 05:15
davecumber davecumber is offline
Registered User
 
Join Date: Jul 2012
Posts: 1
Select most recent related record from related Table

I have a DB with customers in one table and then related tables that contain each time we speak to them, each time they order something and each time there is a meeting with them.

I've been asked to setup a query that will show the user's details, from the customers table and then the most recent dated entry in the other 3 tables.
I know that this is asked for a lot and have tried a few of the solutions I have found but I get a variety of errors from each when I try them. I'm not sure if I've been translated the table names incorrectly.

Can anyone help me? I have got so far which gives me a list of all companies, with a date set in the column for those that we have never contacted.

Code:
Select contacts.*,iif(isnull([date chased]),'31/12/9999',[date chased]) AS [Date_Chased]
from contacts
LEFT JOIN [chases table] on
contacts.id = [chases table].company
Thanks

Dave
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On