[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

user-defined type not defined message

Posted on 2006-10-26
3
Medium Priority
?
455 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
[X]
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
3 Comments
 
LVL 53

Accepted Solution

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

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

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

650 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