Click to See Complete Forum and Search --> : Programming in Access
richy
Nov 20th, 2000, 09:26 AM
I've found some code for Microsoft Access VB Modules which uses the same code as using the Data Control in Visual Basic. e.g. dim db as Database etc
The problem is when I do this in a VB Module the debugger pops up asking me what I'm going on about. The same error if you do that type of code without putting the data control in Visual Basic.
Do I need to add a feature, or an object to get this working. I wouldn't have thought that anything like the Data Object would need to be added to Access, because it is a database program!
paulw
Nov 20th, 2000, 09:40 AM
Have you set the reference to DAO Object Library and/or the Access 8.0 Object Library?
Are you using Access as an object or is this straight DAO?
Might give you some starting points...
P.
richy
Nov 20th, 2000, 09:52 AM
I'm using DAO (a vb module in access). As I said before I would've thought that Access would automatically load anything that it needed to access it's own objects, but if this is not the case, how to I set a reference to the DAO object library.
paulw
Nov 20th, 2000, 09:59 AM
Sorry, misunderstood. Thought you were coding in VB. You are using Access, yeh? What version? If it is 2000, it will use ADO by default. I am not certain with Access 2000, cos I don't have it, but I think you will find it under Tools... References... which is only available when editing a module.
Look for DAO 3.6 or similar...
If its a previous version, post some code and I'll have a go.
P.
richy
Nov 20th, 2000, 10:00 AM
ha ha. i've found the References menu, but I have Microsoft Access 9.0 Object library already selected so is there something else I need to do?
richy
Nov 20th, 2000, 10:03 AM
I've found the DAO Object so now selected it. Yes, I have Access 2000, now I'll just go and try it...
Yep, that has found the object of database, so thank you very much for your help paul w.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.