You are here:

Using MS Access/Min Date - Count of Invoices

Advertisement


Question
Good afternoon -

I have a list of 60,000+ orders which are processed on multiple shipment ID's (BOLs).  I have a table showing the shipment information and a table showing the order information (creation/received dates).

I am trying to show the first receipt date (min) and the number of orders on that date.  I also am trying to pull the total number of orders.  I am able to get one or the other, but not both.

-- Any help is greatly appreciated.

Answer
Might help to know the table structure.

The main question is where do you want to display this information. But I can see three expressions that will get all three numbers:

1) DMin("[shipdate]","shipmenttablename")
2) DCount("*","ordertablename","[OrderDate] = #" & DMin("[shipdate]","shipmenttablename") & "#")
3) DCount("*","ordertablename")


Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Education/Credentials
Brooklyn College BA

©2016 About.com. All rights reserved.