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

Database data type error 97-2000

Status
Not open for further replies.

Darrylles

Programmer
Feb 7, 2002
1,758
GB
Hi All,

I think that this may well be a common problem, but is there a quick/easy solution?

I have converted an Access '97 database application to 2000.
Switchboard had been used to create the 'menu' form etc in the '97 version. When the switchboard form is run in 2000 it uses VBA code which 2000 doesn't like, specifically:

'dim dbs as database'

with the message: "User defined type not defined"

It seems that 2000 doesn't have the 'database' type.
Any ideas of how to convert ALL of the code to be 2000 compliant?

Any help or hints much appreciated.

Regards,

Darrylle







"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Hi!

You may still use it, if you'd like.

In Tools | References check the Microsoft 3.6 DAO Object Library

Then Debug | Compile, it should do the trick.

QAD code for opening a recordset in ADO;

dim rs as ADODB.Recordset

set rs = new ADODB.Recordset

With rs
.ActiveConnection = CurrentProject.Connection
.CursorType = adOpenForwardOnly ' or whatever
.LockType = adLockReadOnly ' or whatever
strSql = "Select * from tblTest"
.Open strSql, Options:=adCmdText
'misc code
.close
End With
Set rs=nothing

HTH Roy-Vidar
 
Hey Roy! This is Roy...

I'm having the same issue with this, in fact, I tried what you suggested (I'm working on a Network) and in my Tools, it doesn't have "References".

I'm running Microsoft Office Professional 2000 (Access v9.0.4402 SR-1) on a (I believe) Windows 2000 server.

Please advise!! Thanks in advance.

Roy McCafferty
aka BanditWk

Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

"No need to send gifts, just send a smile."
 
Hi!

Just to be sure, You are looking for the "Tools" menu in the VBA Environment?

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top