I want to create recordset from local table with code:
Dim dbs As Database, rstCustomers As Recordset
Set dbs = CurrentDb
Set rstCustomers = dbs.OpenRecordset("Customers")
but as I type "dim dbs as...", in popup menu there is no "Database" option to chose from! If I will type it and try to run, error message is popping up: Compile error: User-defined type not defined.
Thank you for any help.
Dim dbs As Database, rstCustomers As Recordset
Set dbs = CurrentDb
Set rstCustomers = dbs.OpenRecordset("Customers")
but as I type "dim dbs as...", in popup menu there is no "Database" option to chose from! If I will type it and try to run, error message is popping up: Compile error: User-defined type not defined.
Thank you for any help.