Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases 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 25th, 2004, 08:55 PM
Authorized User
Join Date: Aug 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO - CurrentProject.AccessConnection

I am trying to use ADO to connect to a local database. I had it working earlier using the following line of code:

Set localConnection = CurrentProject.AccessConnection

But now when I am using this same code for a different database, VBA says that CurrentProject doesn't recognize this property for CurrentProject. Does anybody have any idea why VBA would start being so stubborn?

localConnection is my connection variable

I have it declared as follows:

Dim localConnection As New ADODB.Connection

Old September 26th, 2004, 04:15 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

AccessConnection is not available in Access 2000, try using Connection instead. You may be using Access version after 2000 but saving database in 2000 format.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between ADO and ADO.NET rakeshclose2u ADO.NET 2 April 23rd, 2007 03:57 AM
ADO ProudToBeMuslim VB Databases Basics 6 January 30th, 2005 11:23 AM
ADO AND ADO.NET royalsurej ADO.NET 1 November 8th, 2004 08:28 AM
ADO could ADO counot find the specified provider. Rob Collie Classic ASP Databases 2 June 9th, 2003 04:12 AM

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