Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 6th, 2004, 06:02 PM
Authorized User
 
Join Date: Mar 2004
Location: Orange County, California, USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dim dbs As Database

I am not sure why this is happening.
When I typed in the lines below, I wasn't given the option of Database after the As sentax. Now I am getting a Compile Error, User-Defined Type not Defined.

Any Idea why?

Private Sub cmdAdd_Click()

        Dim dbs As Database, rst As Recordset

Reply With Quote
  #2 (permalink)  
Old May 6th, 2004, 07:11 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It depends on what references you have, for example ADO or DAO.
Acc97 comes with DAO as default
Acc2k comes with ADO as default

So make sure you've got your references in order

If you're using DAO, try
Dim dbs as DAO.Database

If you're using ADO, try
Dim dbs as ADODB.Database

HTH

Steven

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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
What does (Me!) and (Dim)stand for in VBA Coding? srswedeen Access VBA 1 October 14th, 2005 06:41 AM
Can't DIM database object egolsen Access VBA 2 September 26th, 2005 04:25 PM
Dim Types in ASP? rmwalters2000 Classic ASP Basics 2 August 11th, 2004 12:28 AM
Dim in VB.NET khautinh VB.NET 2002/2003 Basics 2 August 3rd, 2003 09:54 PM



All times are GMT -4. The time now is 04:53 PM.


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