Forums

This topic is locked

Get the record number

Posted 21 Apr 2003 10:47:42
1
has voted
21 Apr 2003 10:47:42 Talal Nabil posted:
Hello,

Do you guys know how to get the record number from a recordset...
I have a recordset that based on a querry in access, what i want is to get the record number for each record.

Any ideas..

Replies

Replied 21 Apr 2003 12:32:33
21 Apr 2003 12:32:33 Owen Eastwick replied:
Do you have the recordset displayen in a repeat region?

Regards

Owen.

-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm

Developer services and tutorials: www.drdev.net

Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Replied 21 Apr 2003 15:46:06
21 Apr 2003 15:46:06 Talal Nabil replied:
Hi again,

No Owen, I'm only displaying one record from the recodset.

The story is that I have a table for orders, and I made a recordset to display all the orders for a single customer. I want to get the record number for a specific order.

For example: if Customer 'A' has 5 orders from total of 20 orders
The recordset will display his 5 orders, there is Auto Order No but I want to display that order no 18 is Order No 4 for this customer

Thank you for help <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle><img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>
Replied 22 Apr 2003 15:49:27
22 Apr 2003 15:49:27 Vince Baker replied:
Create a recordset with the where statements to filter exactly what you want but add a count into the select statement.

i.e.

Select count(fieldID) as OrderNumber
from yourtable
where yourfield = something

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 23 Apr 2003 09:05:10
23 Apr 2003 09:05:10 Talal Nabil replied:
hey Vince,

thanks for trying to help but I guess u didn't get me right.
What I want to display based on
where customer is "A":

RecordNo | OrderNO | Customer
1 | 12 | A
2 | 15 | A

and if the customer is "B" it shows:

RecordNo | OrderNO | Customer
1 | 9 | B
2 | 11 | B

Its like the record column when you test the recordset in DMX

Any help <img src=../images/dmxzone/forum/icon_smile_dead.gif border=0 align=middle>
Replied 23 Apr 2003 12:29:01
23 Apr 2003 12:29:01 Julio Taylor replied:
what you need is a row number. i'm not sure of the syntax but i think you need to do this via the front end.

------------------------
Julio

PHP | MySQL | DWMX

ICQ: 19735247
MSN:

Reply to this topic