Hi experts,
I'm using Visual Basic 6, MS Access as Database and Data Environment in my Data Report. I would like to give numbers for my selected data. I separated my data and the numbers then used this code.
The problem is it's not produce sequence numbers. Thanks for your help.
I'm using Visual Basic 6, MS Access as Database and Data Environment in my Data Report. I would like to give numbers for my selected data. I separated my data and the numbers then used this code.
Code:
SELECT Customers.CustomerID, Customers.CompanyName, (SELECT Count(*) From Customers As Rank Where Rank.CustomerId <= Customers.CustomerId) AS RecordNumber FROM Customers ORDER BY Customers.CustomerID;
Comment