Weird Error Message
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
' Close the recordset
Set rst = Nothing
' Return the path and file name
IconPath = gstrRoot & gstrIco
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.