i am useing class and i write this code

'*************************
Public Sub HOSPLIST(FRM As Form,list as object)
FRM.List.Clear
Set Rs2 = New Recordset
Set Rs2 = cn.Execute("SELECT * FROM HOSPT")
Do Until Rs2.EOF
FRM.List.AddItem Rs2("HOSPNAME")
Rs2.MoveNext
Loop
Rs2.Close
Set Rs2 = Nothing
End Sub
'***************************
'where list is combobox or listbox