u need to first open the database and assign its table's contents to a recordset object. all these u have to do in form_load event. try this code snippet :-
'in general section
dim db as database,rs as recordset
'in form_load event
set db=opendatabase(app.path & "\yourdbname.mdb")
set rs=db.openrecordset("yourtablename",dbopentable)
if rs.recordcount>0 then rs.movefirst
'in listbox click event
set rs=db.openrecordset("select roll from yourtablename where name='" & list1.text & "'",dbopendybaset)
if rs.recordcount>0 then
text1.text=rs("roll")
endif
set rs=nothing