Results 1 to 5 of 5

Thread: Combo box

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    36

    Post

    In my form I am displaying the state in a combo box.When I am saving the data in my recordset it is fine but,when I want to display it in the combobox from my reocrdset it is giving an error "Read only property".How do I display the value from the recorset in the combo box?Please reply.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,175

    Post

    What property of the combobox are you attempting to modify? It would help if you posted some of your code.

    ------------------
    Marty

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    36

    Post

    When I am displaying the record in the form from the recordset i have written
    combo1.text = rs!state

  4. #4
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Anita try,

    combo1.clear
    rs.movefirst
    do
    combo1.AddItem rs!State
    rs.movenext
    if rs.eof then exit do
    loop
    combo1.listindex = 0

    hope it helps

  5. #5
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Text property of the Combobox will be read-only if you set the Style property to 2 (Dropdown List). You can use AddItem method instead.


    Combo1.AddItem "MyItem"
    Combo1.Listindex = Combo1.NewIndex


    ------------------

    Serge

    Software Developer
    Serge_Dymkov@vertexinc.com
    Access8484@aol.com
    ICQ#: 51055819



    [This message has been edited by Serge (edited 11-24-1999).]

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