Click to See Complete Forum and Search --> : VB to Access 2000
ALWard
May 29th, 2001, 10:44 AM
Hi, I'm trying to print a report in Access through Visual Basic and I can't get it to work with Access 2000. It works great with 97 but will not work with 2000. Am I missing something?
Thank you for any help!!!!!!
Amy
pdevries
May 29th, 2001, 11:14 AM
Do you have any of the Visual Basic service packs? I know either SP3 or SP4 (not sure about SP1 or SP2) has a fix for working with Access 2000. SP5 is out now at http://msdn.microsoft.com/vstudio/sp/vs6sp5/default.asp
ALWard
May 29th, 2001, 11:29 AM
I am using SP5 and still receive an Active X error when trying to execute the connection to the Access 2000 database. Are there any data components i'm missing or is there anything i need to do differently in my code?
Thank you so much for responding!!! Greatly Apreciated!
Amy
pdevries
May 29th, 2001, 11:42 AM
I'm going to assume you're doing everything programmatically--if you're not doing it programmatically then I have no idea.
You might want to check your references:
ADO: Microsoft ActiveX Data Objects 2.5 Library
DAO: Microsoft DAO 3.6 Object Library
If this doesn't fix it then I'm not too sure what could be wrong unless you've changed things within the database or in the code. When I moved form Access97 to Access2000 my problems were fixed when I started using a service pack.
Is there just one particular point that it craps out on? If so, what's that line?
Philip
Share2
May 30th, 2001, 04:06 AM
I suggest you try EasyGrid OCX. It's very easy and powerful.
Maybe it will help you.
Download it from http://www.share2.com/easygrid/
Cubbie
May 30th, 2001, 10:08 AM
You may need mdac 2.6. Try the following site:
http://www.microsoft.com/data/download.htm
ALWard
May 30th, 2001, 11:16 AM
Thank you for responding. I have all the data components updated and using service pack 5 and still getting that Active X error. Is the code different when talking to Access 2000 as opposed to 97? The program craps out when it hits the fist line to open the database and gives the the Active X error.
Thank you!!!!!
Amy
Cubbie
May 30th, 2001, 11:41 AM
Post a snippet of your code and maybe someone can help!
coolbiz
May 30th, 2001, 11:44 AM
How do you connect to ACCESS? Is it through referencing to ACCESS ACTIVEX library (Project->References)? If so, if I'm not mistaken, ACCESS97 and ACCESS2000 are using a different OLB files (file that you point to via Project->References).
ACCESS2000 OLB: C:\....\MSACC9.OLB (Microsoft Access 9.0 Object Library)
ACCESS97 OLB: C:\....\MSACC8.OLB (Microsoft Access 8.0 Object Library)
So if you developed your program on a machine that has Access97, then you have the reference to the old OLB and when you bring the same program to a machine that has Access2000, the OLB does not exist and that could be the cause.
Another option is to not do EARLY BINDING (via REFERENCE). Use the CreateObject() function to create the Access.Application object on the fly. This way, VB will open up the whatever version of Access installed on that PC.
-Cool Bizs
Chandler
June 1st, 2001, 11:38 AM
You Service Pack 4 or 5 not sure which on Micrsoft downloads
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.