SEarch Question in Access 2007

Posted on 2011-10-26
Medium Priority
Last Modified: 2012-05-12
Hi everyone,

I am getting the User Defined Type Not Found Compile error when this coding runs.

Dim rs As DAO.Recordset is highlighted in Yellow

Public Sub Command9_Click()

Dim rs As DAO.Recordset

Set rs = Me.Recordset.Clone
rs.FindFirst "[SSN] = '" & Me.Text10 & "'"
If rs.NoMatch = True Then
    MsgBox "There are No Records Found for this Social Security Number.  Please Try Again"
    Me.Bookmark = rs.Bookmark
End If
End Sub

Question by:jjc9809
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37035527
* see if you have any reference prefixed with "MISSING", uncheck and locate available version of library if there is any.

if you can get an image of the Reference window, post it here..
LVL 61

Accepted Solution

mbizup earned 2000 total points
ID: 37035570
In addition to cap1's comment, specifically make sure that you have a reference to Microsoft DAO 3.6 (or whatever version) checked.

You can locate your references though the VBA Editor's menu:

Tools -> References

Author Closing Comment

ID: 37035620
mbizup ,

You solved the problem.  The references dialog box had the 3.6 DAO unchecked.  When I checked it and ran the program no more problems.  


Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
A quick solution showing how to control and open a POS Cash Register Drawer using VBA with MS Access.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

571 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