Solved

user-defined type not defined message

Posted on 2006-10-26
3
396 Views
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
        rs.AddNew
        GetNextNumber = rs!CurrentCount
        rs.Update
    Else
        rs.AddNew
        GetNextNumber = rs!CurrentCount
        rs.Update
        rs.Delete
    End If
    rs.Close
    Set rs = Nothing
End Function
0
Comment
Question by:msummerma
  • 2
3 Comments
 
LVL 49

Accepted Solution

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

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)
0
 
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.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
This is an explanation of a simple data model to help parse a JSON feed
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…

744 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

13 Experts available now in Live!

Get 1:1 Help Now