Hi Brian,,
Welcome :)
If you want the latest records that have been added or modified, you will need tracking fields. Add these 2 field to each table:
dtmAdd, date/time, DefaultValue =Now(), date/time record was created
dtmEdit, date/time, DefaultValue =Now(), date/time record was updated using form BeforeUpdate event
~~~
assuming it is ScheduleDate is the date you want to use to determine recent activity, you can do something like this:
SELECT *
FROM Tablename
WHERE ScheduleDate = dMax("ScheduleDate","Tablename","AccountId=" & AccountId)
Warm Regards,
Crystal
Access Basics by Crystal (Bill Mosca's site)
http://thatlldoit.com
Free 100-page book that covers essentials in Access
*
(: have an awesome day :)
*
--- On Wed, 7/6/11, WonderBoyMI wrote:
> 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 :)
>
>
Rabu, 06 Juli 2011
Re: [MS_AccessPros] Want to show only the most recent activity on an account
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar