Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User-defined type not defined error. 1

Status
Not open for further replies.

BYTERYTE

IS-IT--Management
Mar 2, 2004
13
US
In the "Dim grp as DAO.Group" line of the following routine I'm getting a VB Compile Error: "User-defined type not defined"

----------------------------------------------------------
Private Function UserIsInGroup(UserName As String, GroupName As String) As Boolean
Dim grp As DAO.Group

On Error Resume Next
Set grp = DBEngine(0).Users(UserName).Groups(GroupName)
UserIsInGroup = Not grp Is Nothing
Set grp = Nothing
End Function
----------------------------------------------------------

The full module can be found here:



Any help is greatly appreciated.

Best Wishes,

Steve Foote
Savannah Georgia
 
Looks like your project needs a reference to DAO library.

Project | References | Microsoft DAO 3.6 Object library

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Thanks John. I checked the DAO component in Visual Basic Editor and it went right to work.
 
You're welcome, and thanks

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top