I keep having this problem and i dont know how to fix this, but i will explain the problem. A started making a DB in VB with ado 6.0, and i had some compatibility problems, anyways i fixed this (i read somewhere to untick dao or somthing like that). Anyways that worked all good, now i want to create my program using DAO but the problem is it disapeared from my components, so i dont have dao only ado. My friend sent me his program which is all linked by codes and when i run it , it all works. But when i try make my own i get an error.
So i make a new form, and i type this code in.
CODE
Option Explicit
'
Dim dbMyDB As Database
Dim rsMyRS As RecordSet
Private Sub Form_Load()
Set dbMyDB = OpenDatabase("I:\MyDatabase.md...
Set rsMyRS = dbMyDB.OpenRecordSet("MyTable"... dbOpenDynaset)
If Not rsMyRS.EOF Then rsMyRS.MoveFirst
Do While Not rsMyRS.EOF
lstRecords.AddItem rsMyRS!Name
lstRecords.ItemData(lstRecords... = rsMyRS!ID
rsMyRS.MoveNext
Loop
End Sub
whenever i try to run it says compiler error and it highlights this "dbMyDB As Database" anyone know why

?
EDIT : Code Tags Added -b2c-