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 52

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 52

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 66

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

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 …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

726 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