well first you have to do is apply the references to Dao in the menu project -> references and selecting
Microsoft Dao 3.x Object Library then the code:
Dim MyDb1 as Dao.Database
Dim MyRs1 as Dao.Recordset
Set MyRs1 = Mydb1.OpenRecordset("student")
... well here the rest of your code for the query
then on the form load: (this is the first line runs so don`t forget, because this for open the database before to do the recordset!)
Set MyDb1 =OpenDatabase(App.path & "\MyDatabase.mdb")
remember save the project first and put the DB on the same diretory of your project , if you don't do `t no works because App.path get
C:\Archivos de programa\Microsoft Visual Studio\VB98 as default
am i guest your Bd is another place!