user-defined type not defined message

Posted on 2006-10-26
Last Modified: 2010-04-16
Public Function GetNextNumber() As Long
I am getting this message ...user-defined type not defined...???
 Dim rs As DAO.Recordset
    Set rs = CurrentDb.OpenRecordset("tblReportCount")
    If rs.EOF = True Then
        GetNextNumber = rs!CurrentCount
        GetNextNumber = rs!CurrentCount
    End If
    Set rs = Nothing
End Function
Question by:msummerma
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 51

Accepted Solution

Ryan Chong earned 125 total points
ID: 17812677
try check and make sure you got M$ DAO Object Library from your Reference?
LVL 51

Expert Comment

by:Ryan Chong
ID: 17812721
If M$ DAO Object Library is not available from Reference, you can try click the Browse button, and find it at:

<Program Files folder>\Common Files\Microsoft Shared\DAO

and find for the respective DLL (like DAO350.DLL, dao360.dll)
LVL 65

Expert Comment

by:Jim Horn
ID: 17812766
ryancys is very likely correct... 'User-Defined type not defined' usually means that you forgot to set a refernect, say to DAO.Recordset, and without it Access doesn't know what a DAO.Recordset is.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question