i have a student maintenance form in my program

im using this code to update the database

Adodc1.Recordset!StudName = txtStudName.Text
Adodc1.Recordset!StudId = txtStudId.Text
Adodc1.Recordset!Course = cboCourse.Text
Adodc1.Recordset!Section = cboSection.Text

Adodc1.Recordset!first_day = cbo1day.Text
Adodc1.Recordset!FDlogin = cbo1.Text
Adodc1.Recordset!FDlogout = cbo11.Text

Adodc1.Recordset!second_day = cbo2day.Text
Adodc1.Recordset!SDlogin = cbo2.Text
Adodc1.Recordset!SDlogout = cbo22.Text

Adodc1.Recordset!third_day = cbo3day.Text
Adodc1.Recordset!TDlogin = cbo3.Text
Adodc1.Recordset!TDlogout = cbo33.Text

the update is good but in the line Adodc1.Recordset!FDlogin = cbo1.Text
the vb displays a runtime error "Item cannot be found in the collection corresponding to the requested name or ordinal"

the cbo1.text contains multiple time choices like 06:00:00 AM and 07:00:00 AM, i need to put the choosen time in the database field
cbo1.text = FDlogin "First day log in" in database

i dont know why the run time error exist... maybe because the choices are in time format and im getting it as String or?... no idea in this error so, please explain also what is the cause of the run time error. thanks :))

need urgent reply, and thanks in advance

6 Years
Discussion Span
Last Post by xtianenikkian

"Item cannot be found in the collection corresponding to the requested name or ordinal"

That usually shows up because the field name isn't spelled right or does not exist in the field names of the recordset.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.