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

database object missing in Access 2000

Status
Not open for further replies.

kgamble

Technical User
Mar 15, 2001
6
AU
G'day

The code below causes a compile problem on two out of 5 pc's we have running access2000.

Private Sub opencusfile()
Dim objdb As Database
Dim objrs As Recordset
Set objdb = CurrentDb()
Set objrs = objdb.OpenRecordset("select * from customers", dbOpenDynaset)

Do While Not objrs.EOF
Debug.Print objrs.Fields("customerid")
objrs.MoveNext
Loop

End Sub

The message is "User defined type not defined"
This is because when I look at the object browser there is no 'database' object.
On the machines that work the 'database' object exists.

There would seem to be a problem with the installation of access2000 so we tried a removal and complete re-install. This didn't change anything.
We tried starting a completely new database but this didn't work either.

We checked that the Jet engine version was 4 and it is.

Any ideas?


 
If it works on 1 but not on another and it's a Data Access Problem, I would first try re-installing the latest MDAC Stack availalble from Microsoft. Craig, mailto:sander@cogeco.ca
"Procrastination is the art of keeping up with yesterday."
I hope my post was helpful!!!
 
G'day again

we solved it! For some (unknown reason to us) "Microsoft DAO 3.6 object library" was not loaded. We found this omission in the "tools" "references" dropdown when in the microsoft visual basic window.

however, there was also a further problem. If there was also an activex (I cannot remember which one) also loaded, there was a "runtime" error as there was a "type" mismatch on the database object (we think). When the activex was removed all was hunky dory.

great way to waste nearly a whole day!

Thanks
K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top