A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Ranking (tried a solution by John Spencer, but didn't work)



 
 
Thread Tools Display Modes
  #1  
Old July 3rd, 2008, 10:17 PM posted to microsoft.public.access.queries
Emgee
external usenet poster
 
Posts: 2
Default Ranking (tried a solution by John Spencer, but didn't work)

This is my current table "allunitbatch". Want to automatically rank the
batch Ids within each MD Batch Id group so it gives the results shown in the
Rank column below.

Batch Id MD Batch Id Rank
APPL-MOM-309-07-01 APPL-MOM-309 1
BANA-HTL-120-06-01 BANA-HTL-120 1
BANA-HTL-120-07-01 BANA-HTL-120 2
CHER-INF-142-07-02 CHER-INF-142 3
CHER-INF-142-06-01 CHER-INF-142 1
CHER-INF-142-07-01 CHER-INF-142 2

Tried the following as a calculated field but it didn't work:
Rank: DCount("*","allunitbatch","MD Batch Id = """ & [MD Batch Id] & """ and
Batch Id " & Batch Id) + 1
--
Emgee truly grateful...
for help and to help
  #2  
Old July 3rd, 2008, 11:25 PM posted to microsoft.public.access.queries
Emgee
external usenet poster
 
Posts: 2
Default Ranking (tried a solution by John Spencer, but didn't work)

Please disregard the below. I used a solution provided by John Spencer in
another thread (using my data) and it worked.
--
Emgee truly grateful...
for help and to help


"Emgee" wrote:

This is my current table "allunitbatch". Want to automatically rank the
batch Ids within each MD Batch Id group so it gives the results shown in the
Rank column below.

Batch Id MD Batch Id Rank
APPL-MOM-309-07-01 APPL-MOM-309 1
BANA-HTL-120-06-01 BANA-HTL-120 1
BANA-HTL-120-07-01 BANA-HTL-120 2
CHER-INF-142-07-02 CHER-INF-142 3
CHER-INF-142-06-01 CHER-INF-142 1
CHER-INF-142-07-01 CHER-INF-142 2

Tried the following as a calculated field but it didn't work:
Rank: DCount("*","allunitbatch","MD Batch Id = """ & [MD Batch Id] & """ and
Batch Id " & Batch Id) + 1
--
Emgee truly grateful...
for help and to help

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.