Click to See Complete Forum and Search --> : Combo box
Anita
Nov 23rd, 1999, 05:12 AM
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.
MartinLiss
Nov 23rd, 1999, 05:18 AM
What property of the combobox are you attempting to modify? It would help if you posted some of your code.
------------------
Marty
Anita
Nov 23rd, 1999, 06:29 AM
When I am displaying the record in the form from the recordset i have written
combo1.text = rs!state
jritchie
Nov 23rd, 1999, 06:50 AM
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
Serge
Nov 23rd, 1999, 08:47 AM
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 (http://www.icq.com/51055819)
[This message has been edited by Serge (edited 11-24-1999).]
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.