473,503 Members | 5,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Numbering Records Based On Another Field In A Report

I posted this yesterday and it seems like a moderator has thrown it in
another thread. This is a totally different question to the one asked
in that thread, so I'm posting it again. It is not a simple
"numbering records on a report" question. It is more complex than
that.

I have a report that shows the results of a query. One of the fields
is an autonumber field from the query which shows for instance: 120,
121 , 122 for 3 records. Is there a way to have another field that
shows the numbering starting from 1 ie. 1, 2, 3? If the records were
sorted so that the first field showed the records in the order: 121,
120, 122 then I would need the second field would show them numbered
as 2, 1, 3. I would also need the second field to follow the numbering
sequence 1, 2, 3 even if the first field skipped a number eg. 120,
122, 123.

Thanks in advance.
Nov 12 '05 #1
2 2291
"Wayne Aprato" wrote
I posted this yesterday and it seems
like a moderator has thrown it in
another thread.


It may, indeed, _seem_ so, but that is not the case because
comp.databases.ms-access is unmoderated and no one can "rearrange" the
messages. Either you inadvertently responded to a message in the other
thread, or you had an exact duplicate of the subject in that thread and your
newsreader uses subject to identify the thread (this is the case with
http://groups.google.com -- there seem to be some exceedingly long threads
there, but on examination, it turns out to be a large number of actual
threads appended one after the other).

Larry Linson
Microsoft Access MVP
Nov 12 '05 #2
You _can_ create a record number in a Query, using a user-defined function,
but you have to be careful -- a given record may be processed more than once
because of the way the query engine works, so you'll need to check the field
on which you are ordering the Query records within the function.

(Unfortunately, my example of this was lost in the course of a change of
primary computers.)

Almost always, there's some other way than using a record number to
accomplish one's purpose. If you'll explain what you need to do, rather than
how you'd like to do it, perhaps someone can suggest an alternative
approach. If not, well, you can create those numbers as I describe above.

Larry Linson
Microsoft Access MVP
Larry Linson
Microsoft Access MVP

"Wayne Aprato" <cq*******@volcanomail.com> wrote in message
news:4d**************************@posting.google.c om...
I posted this yesterday and it seems like a moderator has thrown it in
another thread. This is a totally different question to the one asked
in that thread, so I'm posting it again. It is not a simple
"numbering records on a report" question. It is more complex than
that.

I have a report that shows the results of a query. One of the fields
is an autonumber field from the query which shows for instance: 120,
121 , 122 for 3 records. Is there a way to have another field that
shows the numbering starting from 1 ie. 1, 2, 3? If the records were
sorted so that the first field showed the records in the order: 121,
120, 122 then I would need the second field would show them numbered
as 2, 1, 3. I would also need the second field to follow the numbering
sequence 1, 2, 3 even if the first field skipped a number eg. 120,
122, 123.

Thanks in advance.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2829
by: David B | last post by:
I am creating invoices for an app I am busy with. The transactions for the invoice come from 2 tables which store Sales and Facilities Hire. The current arrangement is that I create a temp...
1
1898
by: Wayne Aprato | last post by:
I have a report that shows the results of a query. One of the fields is an autonumber field from the query which shows for instance: 120, 121 , 122 for 3 records. Is there a way to have another...
2
1883
by: Rob | last post by:
Hi, I have an access 2000 application.I generate a report with Query as the recordsource.This report is the analysis of data Vendorwise.The vendors are listed in ascending order...
1
2252
by: Rinee | last post by:
Hi, I have a database of a bunch of contractors who have signed a safety agreement with us, their contact info, their insurance info, etc. Each was assigned an ID number as the main key. Each...
20
2031
by: Prakash | last post by:
Hi ! I have a field "sub_tran_no" in my form in continuous view. When the user presses a button "Re-Number", I'd like to: 1) Save the current record pointer position 2) Save the current...
3
2572
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table)...
1
3712
by: RussCRM | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
2
4433
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
1
1441
by: lawitt | last post by:
I have a MakeTable query whose resulting table i'm using in a crosstab query. The fields in the crosstab are constantly changing (weekly), so my ultimate goal has been to somehow create a dynamic...
0
7188
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7063
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7441
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.