You are here:

Visual Basic/ranking records

Advertisement


tim wrote at 2015-07-10 10:05:18
please try this.create a rank field in your table and leave it blank.then inthe form load event,put the followin code:



dim i as integer

recordset.cursorlocation=adUseClient

records.open "select *from your_table order by Total DESC,connection,adopendynamic,adlockpessimistic

Do while records.EOF=False

i=i+1

records.Fields("rank").value=i

records.update

records.movenext

loop



please make sure you change the connection,recordset and field to what you declared in your project.

regards,

tim

+254705875621  


Visual Basic

All Answers


Answers by Expert:


Ask Experts

Volunteer


Golfnut_1969

Expertise


Instantiating form variables instead of using Global instances.
User Defined Types
DLLs, ActiveX Exes
String Manipulation
Working with Classes
Custom User Controls
Object Oriented Programming
Database access (SQL Server, MS Access, RDO, DAO, ADO)
Use of Arrays

I do not answer questions regarding databound controls so please ask those questions of one of the other experts.

Experience

I've been working with Visual Basic 5.0 and 6.0 for over 8 years. I've worked extensively with multi-tier database business solutions created in Visual Basic. I've also been working in Visual Basic .NET for over 2 years and Visual Basic .NET 2.0 since its first BETA release. I currently work developing custom applications for a variety of industries. In addition to all the work in Visual Basic 6.0 and .NET I have also worked extensively with ASP .NET and ASP .NET 2.0.

Education/Credentials
Associate’s Degree: Computer Programming St. Louis Community College at Florissant Valley (4.0 gpa) Microsoft Certified Technology Specialist (MCTS) .NET Framework 2.0 Windows Applications

Past/Present Clients
Mallinckrodt Pharmaceuticals Commerce Bank CitiMortgage Elmwood Marine Services FedEx Memco Barge Lines Crounse Corporation AG Edwards

©2016 About.com. All rights reserved.