That worked great. That was amazing. Thank you very much!!!!
With Warm Regards,
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265 Ext. 130
Fax (605)964-1070
"Valar Dohaeris"
On Friday, September 21, 2018 04:26:55 PM CDT, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Art,
Did you try what I suggested?
Regards,
Duane
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Friday, September 21, 2018 3:53 PM
To: Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Need to stop duplicate records
Sent: Friday, September 21, 2018 3:53 PM
To: Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Need to stop duplicate records
PK for tblApplication is ApplicationID
With Warm Regards,
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265 Ext. 130
Fax (605)964-1070
"Valar Dohaeris"
On Friday, September 21, 2018 03:18:13 PM CDT, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Hi Art,
I would try something using a subquery in the criteria. It would be a little simpler if you could provide the primary key field of tblApplication. This query assumes the Application Received date and time are both populated.
SELECT qryApplicantExtended.ApplicantID,
qryApplicantExtended.[Applicant Name],
tlkpApplicationType.ApplicationTypeName,
qryApplicantExtended.HomePhone,
tlkpGender.GenderName,
qryApplicantExtended.MobilePhone,
qryApplicantExtended.WorkPhone,
tblApplication.AppReceivedDate,
tblApplication.AppReceivedTime
FROM ((qryApplicantExtended
INNER JOIN tlkpApplicationType ON qryApplicantExtended.ApplicationTypeID = tlkpApplicationType.ApplicationTypeID)
INNER JOIN tlkpGender ON qryApplicantExtended.GenderID = tlkpGender.GenderID)
LEFT JOIN tblApplication ON qryApplicantExtended.ApplicantID = tblApplication.ApplicantID
WHERE qryApplicantExtended.ApplicantStatusTypeID=4
AND AppReceivedDate + AppReceivedTime =
(SELECT TOP 1 AppReceivedDate + AppReceivedTime
FROM tblApplication A
WHERE A.ApplicantID = tblApplication.ApplicantID
ORDER BY AppReceivedDate Desc, AppReceivedTime DESC)
ORDER BY qryApplicantExtended.LastName;
Regards,
Duane
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Friday, September 21, 2018 1:25 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Need to stop duplicate records
Sent: Friday, September 21, 2018 1:25 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Need to stop duplicate records
I have the following query:
SELECT qryApplicantExtended.ApplicantID, qryApplicantExtended.[Applicant Name], tlkpApplicationType.ApplicationTypeName, qryApplicantExtended.HomePhone, tlkpGender.GenderName, qryApplicantExtended.MobilePhone, qryApplicantExtended.WorkPhone, tblApplication.AppReceivedDate, tblApplication.AppReceivedTime
FROM ((qryApplicantExtended INNER JOIN tlkpApplicationType ON qryApplicantExtended.ApplicationTypeID = tlkpApplicationType.ApplicationTypeID) INNER JOIN tlkpGender ON qryApplicantExtended.GenderID = tlkpGender.GenderID) LEFT JOIN tblApplication ON qryApplicantExtended.ApplicantID = tblApplication.ApplicantID
WHERE (((qryApplicantExtended.ApplicantStatusTypeID)=4))
ORDER BY qryApplicantExtended.LastName;
FROM ((qryApplicantExtended INNER JOIN tlkpApplicationType ON qryApplicantExtended.ApplicationTypeID = tlkpApplicationType.ApplicationTypeID) INNER JOIN tlkpGender ON qryApplicantExtended.GenderID = tlkpGender.GenderID) LEFT JOIN tblApplication ON qryApplicantExtended.ApplicantID = tblApplication.ApplicantID
WHERE (((qryApplicantExtended.ApplicantStatusTypeID)=4))
ORDER BY qryApplicantExtended.LastName;
Which is returning duplicate applicants. I understand why its happening. It because and applicant can have more then one application. How can I get it to return the latest application which would eliminate duplicate?
Thank you
Art Lorenzini
Sioux Falls, SD
__._,_.___
Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
SPONSORED LINKS
.
__,_._,___
Tidak ada komentar:
Posting Komentar