Rabu, 06 Juli 2011

RE: [MS_AccessPros] Want to show only the most recent activity on an account

 

"recent activity on a certain account"

You need to select the most recent date that reflects the activity in which
you are interested. So, the answer to your question depends, in part, on
knowing you define "most recent activity". Is that the most recent
ScheduleDate, the most recent AlarmDate, or one of the other dates?

It would be something like this:

SELECT AccountID, Max(ScheduleDate) AS MostRecentScheduleDate from
tblYourTableName GROUP BY AccountID

Of course, you'll use the actual date field on which you want to filter.

George Hepworth

GPC Data

MS Access MVP 2007-2011

425 876- 0535

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of WonderBoyMI
Sent: Wednesday, July 06, 2011 8:06 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Want to show only the most recent activity on an
account

Good morning;

I'm hoping someone here can help me with this.

I'm trying to create a report that will show only the most recent activity
on a certain account. I for the life of me cannot figure out how to do that.

My table has the following records ScheduleID, AccountId, ContactId,
PersonnelId, ScheduleDate, Status, Type, Contact, Regarding, Result,
Priority, AlarmDate, Activity, RequestId, DateOpened, DateClosed,
ScheduleEndDate, SalesRep

ScheduleId is the unique ID for each entry, AccountID identifies the
account, ScheduleDate is the date the activity is scheduled to happen,
DateOpened is the date created and DateClosed is the date it was completed.

Hopefully this is enough information and someone will be able to help :)

- Brian Wood

I'm using Access 2010

Thanks :)

[Non-text portions of this message have been removed]

__._,_.___
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar