Wrox Programmer Forums
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 26th, 2005, 06:36 AM
Registered User
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't DIM database object

I must be missing something simple. I try to use the statement 'Dim db as Database' and the system tells me that the user defined type not defined. I have the same exact line in another piece of code in another database and it works fine. Any thoughts. I am running Access 2002 on XP professional. I have not written code for this in about 3 years and was thinking that some of the definitions may have changed.

Thanks Eric

Old September 26th, 2005, 09:44 AM
Authorized User
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts

I think you need to add a reference to Microsoft DAO object library. I use the 3.6 one in my app.
Old September 26th, 2005, 04:25 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts

I think hashlishnii is right on that one.
The default for Access 97 was to use DAO, from Access 2000 onwards, the default is ADO.

I am a loud man with a very large hat. This means I am in charge

Similar Threads
Thread Thread Starter Forum Replies Last Post
The origin of the "DIM" keyword RGCook BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 9 February 6th, 2009 09:03 AM
V.B.6 recognition of 'Dim' ed, recordsets liamfitz VB Databases Basics 1 December 25th, 2006 02:43 PM
Dim Types in ASP? rmwalters2000 Classic ASP Basics 2 August 11th, 2004 12:28 AM
Dim dbs As Database Brian263 Access 1 May 6th, 2004 07:11 PM
Dim in VB.NET khautinh VB.NET 2002/2003 Basics 2 August 3rd, 2003 09:54 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.