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

Hello, I am having problems with 2

Status
Not open for further replies.
Nov 6, 2002
89
CH
Hello,

I am having problems with processing a dynamic headers report based on a crsstab query (based on the solutions9.mdb database provided by Microsoft). Access/Visual Basic gives me the notification: "error in compiling, user-definied type not defined (sorry this is a translation from German to English).

The reason for the error (yellow-marked) seems to be in the part
________________________
Dim dbsReport As Database
Dim rstReport As Recordset
___________________________

Do you have any ideas what could be the reason for this error and how I can solve it?

regards, Stefan
 
Hi

Which version of Access are you using?

If you are using A2000 or XP, it is probably because your references are set to use the ADO library (which is the default in versions after A97).

Try first of all qualifying your definitions with DAO like so

Dim dbsReport As DAO.Database
Dim rstReport As DAO.Recordset

if this does not fix it, examine your references, in any code module (design view) choose Tools \ References, look at the list, ensure you have the DAO library present, and above the ADO library (if the ADO library is present), by present I mean selected with a tick in the check box.

And by the way I wish my German was as good as your English! Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Dear Ken

Thank you very much for your help. I will apply your ideas to my database. If it does not resolve the problems, I would like to get back to you.

Kind regards,

Stefan
 
Dear Ken

I implemented your suggestions but unfortunately, my database-report is still not working.

Do you have any other ideas? Could it be a problem with the language (my computer may be standard set to German)?

Just for you information, I am using Access 2000.

Kind regards and many thanks for your excellent support.

Stefan.
 
Hi Stefan

So lets recap

You have made your code:

Dim dbsReport As DAO.Database
Dim rstReport As DAO.Recordset

AND

You have checked that the DAO reference in the list, and ticked, and is above the ADO reference (if present)

and still you are getting:

user-definied type not defined

on the line

Dim rstReport As DAO.Recordset

is this correct?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Dear Ken

I have just noticed that the tick in the reference I already have is ADO and not DAO. Sorry for the confusion.

However, there are a lot of DAO references to choose from (Microsoft ActiveX Data Object 2.0 Library, etc.) Which reference do I have to choose?

Thank you Ken.

regards, Stefan
 
Hi

Microsoft DAO x.y Object Library

where the x.y might say 3.5 or 3.6, I would expect 3.6 Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Dear Ken

Thanks for the help. I think it resolved a lot and the report is ALMOST working.

The only error message that appears now is (translated):

Microsoft Access could not find the symbol list "custom print preview". That's why MS Access does not open the report. Do you know how to solve this problem?

Thanks for your outstanding support.

Stefan
 
Hi Stefan

You have got me with that one, never seen that before, but if I think of anything I will let you know. If you find it before then would you let me know kenneth.reay@talk21.com

Good luck Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top