Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2003
    Posts
    32

    Unanswered: displaying data in combo box

    Hii all,

    I have a small table (Center) with two columns(Name and Code).Both are text fields and Code is the primary key Whenever I am displayig data in the Code field in a Combo Box. the data is displayed in the sorting order based on the Code field. I have one row in which data is NO Center ( name) and NC( code). I want it to be displayed at the last in the list.

    I found that data is stored in the sorted order based on the primary key.

    Please help me in this matter. I think it is a trivial question. But, i donno how to do that.

    Thanks

    Annam

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb Re: displaying data in combo box

    Originally posted by annam
    Hii all,

    I have a small table (Center) with two columns(Name and Code).Both are text fields and Code is the primary key Whenever I am displayig data in the Code field in a Combo Box. the data is displayed in the sorting order based on the Code field. I have one row in which data is NO Center ( name) and NC( code). I want it to be displayed at the last in the list.

    I found that data is stored in the sorted order based on the primary key.

    Please help me in this matter. I think it is a trivial question. But, i donno how to do that.

    Thanks
    Annam
    In the rowSource of your ComboBox just type:

    "SELECT * FROM Center ORDER BY yourDesiredField2Bsorted;"

  3. #3
    Join Date
    Nov 2003
    Posts
    32
    My project is about Tracking Research Project Proposal

    For a project, a center is assigned. if there is no center, then "not applicable is assigned' to that project. Center has center name and code. So. i created a table Center with fields (name, code) . and included all the data about the center name and its code. besides that i included a row " not applicable "( name) and NA ( code).

    when i am displaying the center details in a combo box on the form, i want "Not Applicable" to be at first or at last. But it is coming in between.

    Can you please tell me how to do that? help me in this matter.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Originally posted by annam
    My project is about Tracking Research Project Proposal

    For a project, a center is assigned. if there is no center, then "not applicable is assigned' to that project. Center has center name and code. So. i created a table Center with fields (name, code) . and included all the data about the center name and its code. besides that i included a row " not applicable "( name) and NA ( code).

    when i am displaying the center details in a combo box on the form, i want "Not Applicable" to be at first or at last. But it is coming in between.

    Can you please tell me how to do that? help me in this matter.
    Is not Applicable is only one Record? Sorry I couldn't understand, you can send me a copy of your project.

  5. #5
    Join Date
    Nov 2003
    Posts
    32
    I ATTACHED MY FILE BELOW. I HOPE YOU UNDERSTAND MY PROBLEM

    PLEASE HELP ME IN THIS MATTER

    THANKS

    ANNAM
    Attached Files Attached Files

  6. #6
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Originally posted by annam
    I ATTACHED MY FILE BELOW. I HOPE YOU UNDERSTAND MY PROBLEM

    PLEASE HELP ME IN THIS MATTER

    THANKS

    ANNAM
    I work using Access97, but I could convert it and solve your problem

    Have nice day
    Salam
    Attached Files Attached Files

  7. #7
    Join Date
    Nov 2003
    Posts
    32
    Thanks for your help.I did in the way you specifeid. It worked

    Thanks a lot

    Thanks a lot

Posting Permissions

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