I just purchased the Access Cookbook 2nd Edition from O'Reilly (which I highly recommend), and I have a question on adapting on of the "recipes" from a .mdb to a .adp. Note: I'm using Access 2003 connected to SQL Server 2000.
Recipe 4.3 Verify That Objects Use Consistent Settings uses DAO to create several tables and then populate them with the property values of all the controls on the forms or reports that you select in a .mdb file. Unfortunately, I am using an Access Data Project (ADP) so this isn't working for me.
Can I even use DAO in an ADP?
Anyway, it gets this far into the procedure
Code:
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
'On Error GoTo HandleErr
Set db = CurrentDb
db.Execute "DROP TABLE zstblInventory"
...
and then I get this error message at the "DROP TABLE..." line:
"91: Object variable or With block variable not set."
I am really just looking for a direction like "Learn how to use ADO" or maybe there is a simpler solution.
Any help would be greatly appreciated. Thank you!