Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Help with sql query (find who has file depending on date)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eddy - 09 Nov 2005 19:41 GMT
I've been wracking my head all day with this one.

A file gets assigned to a agent here and over time it gets passed around.
The date the file gets assigned to the agent is recorded. So I have an
invoice table with an agent table and an agentinvoice table in between to
keep track of everyone who's had the invoice.

Now what I need to do is run a query off the agentinvoice table to see who
is currently working with the invoice. I know it has everything to do with
retrieving the max date. I've tried the max function, first, last, everything
I could think of. Can someone give me a hand or point me in the write
direction.

Thanks in advance!!!
Jeff Boyce - 09 Nov 2005 20:33 GMT
Eddy

Create a new query in design mode.  Add the AgentInvoice table.  Select the
InvoiceID field and the DateAssigned field.

Select the Totals button from the toolbar.  Set the InvoiceID groupby
field/cell to GroupBy.

Set the DateAssigned groupby field/cell to Maximum.

Run.  (the query, not you).

Regards

Jeff Boyce
<Office/Access MVP>

> I've been wracking my head all day with this one.
>
[quoted text clipped - 11 lines]
>
> Thanks in advance!!!
Eddy - 10 Nov 2005 00:33 GMT
Thanks Jeff...I appreciate it :)

> Eddy
>
[quoted text clipped - 28 lines]
> >
> > Thanks in advance!!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.