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
  • 2
LVL 50

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 50

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordcount challenge 11 121
How  do I get an older program to run in Windows 10? 20 110
Plain Text Editor for iPad 6 75
draw a Christmas tree by using a nested loop? 26 61
This article will show, step by step, how to integrate R code into a R Sweave document
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

813 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now