G
Guest
I'm working on adding multiple records once by clicking a command button in a
form, I'd like to use Recordset to add the records by using the method AddNew
and Update, but after I declared a variable like as I copied from the book:
Dim dbs As Database, rstCustomers As Recordset
Set dbs = CurrentDb
Set rstCustomers = dbs.OpenRecordset("Customers")
it said "Compile error: User-defined type not defined", is Database a system
defined object? Can I use it like this way?
Any help would be appreciated. Thanks a lot in advance.
form, I'd like to use Recordset to add the records by using the method AddNew
and Update, but after I declared a variable like as I copied from the book:
Dim dbs As Database, rstCustomers As Recordset
Set dbs = CurrentDb
Set rstCustomers = dbs.OpenRecordset("Customers")
it said "Compile error: User-defined type not defined", is Database a system
defined object? Can I use it like this way?
Any help would be appreciated. Thanks a lot in advance.