C
chas
Hi Krish,
Access versions from 2000 on use a different data access
library by default. You need to open your VBA editor and
then choose Tools>References and select 'Microsoft DAO 3.6
Object Library'. If you don't intend to use it you can
deselect the reference to 'Microsoft Activex Data Objects
2.1 Library'. If you do want to keep it, you must prefix
all of your DAO references as below:
Dim db As DAO.Database
Dim rs As DAO.Recordset
The reason for this is that both DAO and ADO libraries
have objects with similar names (ie Recordset).
hth
chas
Access versions from 2000 on use a different data access
library by default. You need to open your VBA editor and
then choose Tools>References and select 'Microsoft DAO 3.6
Object Library'. If you don't intend to use it you can
deselect the reference to 'Microsoft Activex Data Objects
2.1 Library'. If you do want to keep it, you must prefix
all of your DAO references as below:
Dim db As DAO.Database
Dim rs As DAO.Recordset
The reason for this is that both DAO and ADO libraries
have objects with similar names (ie Recordset).
hth
chas