Follow the book operation, the code is as follows:
Option Compare Database
Option Explicit
Public check As Boolean
'by the SQL statement returns a string StrQuery reference ADO.
you objectThe Public Function GetRS (ByVal StrQuery As String) As ADOBE. You
Dim the rs As New ADOBE. You
Dim conn As New ADOBE. Connection
On Error GoTo GetRS_Error
Set the conn=CurrentProject. Connection
Rs. The Open StrQuery, conn, adOpenKeyset, adLockOptimistic
The Set GetRS=rs
GetRS_Exit:
Set the rs=Nothing
Set the conn=Nothing
The Exit Function
GetRS_Error:
MsgBox (Err. Description)
Resume GetRS_Exit
End the Function
Why run the show user-defined types undefined?
Rookie is using Windows 7 64 bit, the vb access2010 module, office seems to be a 32-bit installed, don't know will not have influence, ask the teacher a great god answers