Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Couting Line Items per Order Number in a query

Status
Not open for further replies.

weightinwildcat

Programmer
May 11, 2010
84
0
0
US
I am working on a query, for which I need a calculated field to show the number of line items. The sequence should work like this:

Order Number Line Item Count
100 1
100 2
100 3
100 4
100 5

105 1
105 2
105 3

I have experimented with DCount and DSum, without success. Any suggestions would be appreciated.
 
I would guess you need to Google something like: "access ranking query group by"

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Does the query need to be updateable? Also, it is necessary to have another field in the table that identifies the "sequence". Do you have such a field like a primary key?

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top