Results 1 to 4 of 4

Thread: Sort record

  1. #1
    Guest

    Post

    I have a database through Access that holds name's and addresses. There are duplicate names so the primary key is the generic counter. My question is how can i sort that database from VB6 to where all the names are in order and when using the data controlit scrolls in alphabetical order... Thanks..


  2. #2
    New Member
    Join Date
    Jun 1999
    Location
    Dharmapuri,Tamil Nadu, India
    Posts
    5

    Post

    Hi Wookie,

    For example, your table is address_detail and fields are name,state,... Then you have to declare the following statement in form_load even if you are using Data Control.

    Private Sub Form_Load()

    Data1.RecordSource = "select * from address_detail order by name"

    End Sub

    Now you will get what you have expected at the time of execution.

    Bye!.

  3. #3
    Guest

    Post

    Thanks!!!

  4. #4
    Guest

    Post

    Thanks!!!
    So what do i put on the right of the =
    data1.recordsource = State from address_detail order by name. ???

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