New topic: combobox
<http://forums.realsoftware.com/viewtopic.php?t=46631> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message carlbutler7 Post subject: comboboxPosted: Sun Jan 20, 2013 4:33 pm Joined: Tue Jan 08, 2013 8:27 pm Posts: 11 hi all how can i get a combobox to show the id's of database records so i can select one, then the persons name of that id will be then shown in a text field? Thanks Top Jym Post subject: Re: comboboxPosted: Sun Jan 20, 2013 7:23 pm Joined: Sat Oct 01, 2005 5:19 pm Posts: 3195 Let's assume cb is your combobox and tf is your textfield Dim rs As RecordSet = db.SQLSelect("SELECT id, name FROM myTable") Dim i As Integer = 0 While rs.EOF = False cb.AddRow rs.Field("id").getString cb.RowTag(i) = rs.Field("name").getString i = i + 1 rs.MoveNext Wend Now in the Change Event of cb tf.Text = me.RowTag(me.ListIndex) Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml rbforumnotifier@monkeybreadsoftware.de