Beginner - Error User-Undefined Type not defined 
Author Message
 Beginner - Error User-Undefined Type not defined

Beginners question, why is this code producing the error
"User-Undefined Type not defined"

Private Sub Command1_Click()

Dim dbsNorthwind As Database --------------------> ERROR
Dim rstEmployees As Recordset

Set dbsNorthwind = OpenDatabase("Northwind.mdb")
Set rstEmployees = OpenRecordset("Employees")

Text1.SetText = rstEmployees.RecordCount

rstEmployees.Close
End Sub



Sun, 30 Nov 2003 22:08:34 GMT  
 Beginner - Error User-Undefined Type not defined
You need to add the appropriate type library to the project.  In VBA
(Office 2000), use the Tools menu, References command.  I don't know
which specific library you need

-Dan

Quote:

> Beginners question, why is this code producing the error
> "User-Undefined Type not defined"

> Private Sub Command1_Click()

> Dim dbsNorthwind As Database --------------------> ERROR
> Dim rstEmployees As Recordset

> Set dbsNorthwind = OpenDatabase("Northwind.mdb")
> Set rstEmployees = OpenRecordset("Employees")

> Text1.SetText = rstEmployees.RecordCount

> rstEmployees.Close
> End Sub

--
Please reply to the newsgroup, not to me.  If you wish to contact me
directly, remove "nospam" from my email name before replying.
Thanks, Dan Jinks, Jinks Technoogy Management, Inc. 603-882-8222,
www.Jinks.com.


Sun, 30 Nov 2003 22:42:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Compile Error: User-defined type not defined

2. Compile Error - User defined type not defined

3. Compile Error - User-Defined type not defined

4. User-Defined type not defined error (MAPI.Session)

5. Compile error: User-defined data type not defined!

6. user defined type not defined error help please

7. User-Defined type not defined error (MAPI.Session)

8. ComctlLib; compiler error: User-defined type not defined

9. Help!!-NEWBIE - Application Wizard -(WROX BOOK) Error- User defined type not defined

10. Error: User-defined type not defined

11. Compile error: User-defined type not defined

12. Help!!-NEWBIE - Application Wizard -(WROX BOOK) Error- User defined type not defined

 

 
Powered by phpBB® Forum Software