Combobox text to recordset

Hi,

i used to enter a text in a textfield and store this with other textfields in a database using a recordset. This works fine without any errors. After changing one textfield to a combobox, my database update crashes with a NilObjectExeption.

I use the following code, where txtStatus is the combobox and i used the same name before for my textfield.

rs.Field("status").StringValue = txtStatus.Text

How do i get the text from the selected combobox-item?

Michael

this looks correct. But maybe you add checks?

#if debugBuild then if txtStatus = nil then break end if if rs = nil then break end if if rs.Field("status") = nil then break end if #endif

oh mann… (oh man…) this was only a problem with my query. i use a sqlite- and a mysql-db-option in my app and in the mysql-update method the query was simply going to the wrong table with no field status… changed it to the right table, problem fixed.

thanks Christian.

Michael