O
oldblindpew
Allen, I couldn't get your method to work. I got a compile error because
Access or VBA couldn't recognize DAO.Recordset. This seems incredible. I
pressed F1 help and got this:
"The type is a valid type, but the object library or type library in which
it is defined isn't registered in Visual Basic.
Display the References dialog box, and then select the appropriate object
library or type library. For example, if you don't check the Data Access
Object in the References dialog box, types like Database, Recordset, and
TableDef aren't recognized and references to them in code cause this error."
I went to Tools, References in Visual Basic and there was no "Data Access
Object" in the list. I did find "Microsoft DAO 3.6 Object Library" and
"Microsoft Data Access Components Installed Version". Do one or both of
these have to be checked? Do I really have to manually tell Access that
there is such a thing as DAO?
Could the problem be that the code might not be located in a Public Module??
But the code is part of the form, isn't it?
Access or VBA couldn't recognize DAO.Recordset. This seems incredible. I
pressed F1 help and got this:
"The type is a valid type, but the object library or type library in which
it is defined isn't registered in Visual Basic.
Display the References dialog box, and then select the appropriate object
library or type library. For example, if you don't check the Data Access
Object in the References dialog box, types like Database, Recordset, and
TableDef aren't recognized and references to them in code cause this error."
I went to Tools, References in Visual Basic and there was no "Data Access
Object" in the list. I did find "Microsoft DAO 3.6 Object Library" and
"Microsoft Data Access Components Installed Version". Do one or both of
these have to be checked? Do I really have to manually tell Access that
there is such a thing as DAO?
Could the problem be that the code might not be located in a Public Module??
But the code is part of the form, isn't it?