Results 1 to 3 of 3

Thread: how can i display in a listview the most top income from customers

  1. #1

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    how can i display in a listview the most top income from customers

    hey
    i have a table called TempCash
    i want to know which customer is more profit for me
    e.x
    Code:
      mambo income:15600$
      salsa income:25000 $
      david income:9066$
    the most profit customer will be in the top of the list

    Code:
    DataBase Name:TempCash
    TempCust = customername = Text
    TempPay = Income = Currency
    regards
    salsa

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: how can i display in a listview the most top income from customers

    in your sql, you could use "select top ..........
    or sort your recordset with "order by income" or similar
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    PowerPoster ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    3,048

    Re: how can i display in a listview the most top income from customers

    Hi


    with a sql...
    Code:
    SELECT Employees.EmployeeID, Employees.LastName, Employees.Income
    FROM Employees
    ORDER BY Employees.Income DESC
    regards
    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width