I am developing a Payroll Program. I have created a Database Table in Ms Access 2000. I have placed Text Box controls on my Vb 6 Form including a Combo box.
I want to fill the combo box with employee names when the Form loads. I have tried to write codes that will do this, but can't get it done.
Please kindly assist me. What is wrong with the following codes?:
Private Sub Form_Load()
With adoSubjects.Rec ordset
Do Until Not .EOF
If !SubjectCode <> "" Then
cboSubjects.Add Item !SubjectCode
End If
.MoveNext
Loop
.Close
End With
Thanks.
Akinyemi.
I want to fill the combo box with employee names when the Form loads. I have tried to write codes that will do this, but can't get it done.
Please kindly assist me. What is wrong with the following codes?:
Private Sub Form_Load()
With adoSubjects.Rec ordset
Do Until Not .EOF
If !SubjectCode <> "" Then
cboSubjects.Add Item !SubjectCode
End If
.MoveNext
Loop
.Close
End With
Thanks.
Akinyemi.
Comment