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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data control error

Status
Not open for further replies.

vaughn9

Technical User
Sep 23, 2001
183
I am trying to select a record source for a data control. I place the data control on a form. Selecteted the databasename from the ellipsis, but when I click on the record so"unrecognized database format". The database is a 2000 access .mdb database. When I use the northwind database it works.

I created the database I am trying to use with access 2000. I am using visual basic 6.

I am puzzled. apparently visual basic is looking for an access 2000 database file thought that is what I had.
 
In Datacontrol/Properties window just check that Access 2000 rather than Access is selected.

If your Northwind Database came with original VB6 then it will be Access 97 version.

If you have Access 2000 on your machine you cancheck this by opening Northwind directly in Access 2000, which will grumble over an Access97 db. Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
I don't see an selection for Access 2000 in the data control properties. I only see Access and other datababases
Nwind opens in 2000, so I don't understand why the other database which is also 2000 is giving me an error on record source. I have compared the properties for the 2 data controls(the one that works..nwind and the other that is giving me an error and they are identical)

Still puzzled.
 
I went back and checked the files that are working with the datacontrol. They seem to be Access 97. I need my data control to work with Access 2000 files. I think now that it is not working with access 2000 files. Since I do not have the option for Access 2000 in the data control properties..what do I do
 
The DataControl uses references to DAO 3.6. Check that Project/References includes DAO 3.6.

Check on the Datacontrol/Properties tab/Connect entry which should be set to Access 2000 Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
why dont you use something like ado or dao to connect to the db? ----------------
Joe
 
I included DAO 3.6 but still vb is not allowing me to view the record source in the 2000 database from my data control object
 
OK you've got me puzzled!

I've just opened a virgin project and added a datacontrol to Form1.

On View/Properties window I see the Datacontrol object. By default the connect property is showing Access 2000, but the dropdown gives me other choices.

Try that in a new project and add a command button with this code:

Private Sub Command1_Click()
MsgBox Data1.Connect
End Sub

Let me know what you get
Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
The problem is by default I am getting Access and not Access 2000.

The command button did not help.

I don't understand how come you are getting access 2000 as your default under connect and I am getting just access. I am running VB6.0

Are you able to use the 2000 files. My vb seems to be only using 97
Must be some way to correct this.

Awaiting your reply
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top