Please HELP,
I am new to VBA using MS Access and am trying to get database object variable to connect to my current database and am getting the following error "Compile-error: user-defined type not defined". The code I am writting in the module follows:
Public Function Book_Cnt() As Integer
Dim rs As Recordset
Dim db As Database
Set db = CurrentDb
Set rs = db.OpenRecordSet("BOOKS"
Book_Cnt = 1
End Function
I know this is probably a very simple problem but, like I said I am new to Access and need help. Thanks VERY much for ANY help that can be provided by anyone.
I am new to VBA using MS Access and am trying to get database object variable to connect to my current database and am getting the following error "Compile-error: user-defined type not defined". The code I am writting in the module follows:
Public Function Book_Cnt() As Integer
Dim rs As Recordset
Dim db As Database
Set db = CurrentDb
Set rs = db.OpenRecordSet("BOOKS"
Book_Cnt = 1
End Function
I know this is probably a very simple problem but, like I said I am new to Access and need help. Thanks VERY much for ANY help that can be provided by anyone.