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.
Re: Line numbering in recordset
What do you do with the records that are returned in the recordset?
Re: Line numbering in recordset
What database are you using?
Re: Line numbering in recordset
Judging by the use of the tbl prefix in the table names, I would guess Access.
Re: Line numbering in recordset
Quote:
Originally Posted by boyet0911
. . . BTW. I am using MS Access and VB6 and ADO.
Quote:
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.