|
-
Nov 20th, 2007, 09:46 AM
#1
Thread Starter
Addicted Member
Line numbering in recordset
strSQL = "SELECT tblBillDetails.*, " & _
"(tblBillDetails.SubscriptionFee + tblBillDetails.InstallationFee + tblBillDetails.Arrears + tblBillDetails.Others) as TotalAmountDue, " & _
"(tblSubscribers.Lastname & ', ' & tblSubscribers.Firstname & ' ' & tblSubscribers.Middlename) as SubscriberName, " & _
"tblSubscribers.Barangay " & _
"FROM tblBillDetails " & _
"INNER JOIN tblSubscribers ON tblBillDetails.SubscriberNo=tblSubscribers.SubscriberNo " & _
"WHERE MasterBillNo='" & strMasterBillNo & "' " & _
"ORDER BY tblSubscribers.Barangay, tblSubscribers.Lastname, tblSubscribers.Firstname, tblSubscribers.Middlename"
This query will return a recordset. Normally, it does not have a line numbering in each row.
Can anyone help me modify this code so that i can add line number which is autoincrement or serially.
thanks a lot!
BTW. I am using MS Access and VB6 and ADO.
-
Nov 20th, 2007, 10:02 AM
#2
Re: Line numbering in recordset
What do you do with the records that are returned in the recordset?
-
Nov 20th, 2007, 12:48 PM
#3
Re: Line numbering in recordset
What database are you using?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Nov 20th, 2007, 01:23 PM
#4
Re: Line numbering in recordset
Judging by the use of the tbl prefix in the table names, I would guess Access.
-
Nov 20th, 2007, 02:45 PM
#5
Re: Line numbering in recordset
 Originally Posted by boyet0911
. . . BTW. I am using MS Access and VB6 and ADO.
 Originally Posted by Hack
Judging by the use of the tbl prefix in the table names, I would guess Access.
I guess we missed this part. So I guess my Stored Procedure example wouldn't apply.
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|