Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 7th, 2008, 04:57 AM
Authorized User
Join Date: May 2007
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default Weird Error Message

Hi Guys,

I'm having a weird response from access at the moment in an old module I've used loads of times. I'm getting the error message:

User defined type not defined. for the following routine:

Public Function IconPath() As String
Dim rst As DAO.Recordset
    ' If icon file not set
    If gstrIco = "" Then
        ' Open the ztblVersion table
        Set rst = DBEngine(0)(0).OpenRecordset("ztblVersion")
        ' Get the IconFile field
        gstrIco = rst!IconFile
        ' If there's nothing in the RootPath
        If IsNothing(rst!RootPath) Then
            ' Use the path for this database
            gstrRoot = CurrentProject.Path & "\"
            ' Fetch the RootPath field
            gstrRoot = rst!RootPath
        End If
        ' Close the recordset
        Set rst = Nothing
    End If
    ' Return the path and file name
    IconPath = gstrRoot & gstrIco
End Function

Now I have numerous other applications using this function without problem.

The start off to this was my database was no longer loading the correct information from the link criteria, it was trying to load a new record instead of the identifier. Had this error before when the database gets corrupted.

So created a new database and imported all the forms from another version, that was working. Then this appeared. Any suggestions to resolve this issue, really appreciated, as the form its chosen to do this with is critical to the operation of the system.

Old April 7th, 2008, 03:44 PM
Registered User
Join Date: Mar 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

To start with, are all of your variables dimensioned?
Old April 8th, 2008, 04:52 AM
Authorized User
Join Date: May 2007
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts


please clarify that. You may be saying one thing and I'm thinking of another - cabbage / lettuce :)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird Syntax Error mjhoagland Classic ASP Professional 3 May 5th, 2007 04:25 AM
VWD Weird Error bmains Visual Studio 2005 1 May 2nd, 2005 09:46 AM
Weird MySQL error cmiller PHP Databases 3 April 6th, 2004 04:08 AM
Weird Combobox Error kpowers@wppisys.org ADO.NET 0 October 1st, 2003 10:43 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.