Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Control and Access 2000 ?

Status
Not open for further replies.

TomB

Programmer
Feb 23, 2001
27
0
0
DE
I have to update an old application which uses the Data Control to connect to an Access Database (98). Now it should connect to an Access 2000 DB, but it can't open it. Is there any way to make it work without replaceing all controls ? If I have to replace the contols which new ones should I use instead ?

Thanks !
Tom
 
Change : go to Project References and look at

Microsoft DAO 3.6 Object Library

Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
But that does not update the Data Control ! Or at least I can't get it running ... The access with the Database Object works with 3.6, what do I have to change in the Control ?

Thanks

Tom
 
you have to open a recordset and to asign the data control to that recordset. Try this:
sPath = "C:\Program Files\DevStudio\VB\dbsName.mdb"
Set daoDB36 = DBEngine(0).OpenDatabase(sPath)
Set rs = daoDB36.OpenRecordset("SELECT * FROM tblTable")
Set Data1.Recordset = rs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top