Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 7th, 2008, 04:57 AM
Authorized User
Join Date: May 2007
Location: , , .
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.

Reply With Quote
  #2 (permalink)  
Old April 7th, 2008, 03:44 PM
Registered User
Join Date: Mar 2008
Location: Cedar City, UT, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

To start with, are all of your variables dimensioned?
Reply With Quote
  #3 (permalink)  
Old April 8th, 2008, 04:52 AM
Authorized User
Join Date: May 2007
Location: , , .
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 :)

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 02:30 PM.

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