Private Sub CmbFulNM_LostFocus() RES.Open "student_record_database",CON,adOpenDynamic,adLockOptimistic,adCmdTable For i = 0 To RES.RecordCount - 1 CmbRNO.Text = RES!ROLLNO // at this line control goes to the cmbrno_click event which is having same part of coding and executes that also. TxtFNM.Text = RES!FIRST_NAME //error like: item not fount in corresponding ordinal TxtMIDNM.Text = RES!MIDDLE_NAME TxtLNM.Text = RES!LAST_NAME Text5.Text = RES!CONTACT Text6.Text = RES!CONTACT1 Text7.Text = RES!CONTACT2 TxtADDR.Text = RES!ADDRESS COMBO1.Text = RES!GRADE CmbDiv.Text = RES!DIV CmbBG.Text = RES!BLOOD_GROUP If CmbRNO.ListCount > 0 Then CmbRNO.ListIndex = i Next i RES.Close End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)