I have code in a form that sets the path to images. It works fine in Access 2000.
When I run it in Access 97 I get a compile error, Sub or Function not defined and it hangs on the string "InStrRev". Is there an equivelent 97 instruction? The full expression set is below with the point of the error in bold.
Thanks,
Scott Doyle
When I run it in Access 97 I get a compile error, Sub or Function not defined and it hangs on the string "InStrRev". Is there an equivelent 97 instruction? The full expression set is below with the point of the error in bold.
Function setImagePath()
Dim strImagePath As String
Dim strMDBPath As String
Dim intSlashLoc As String
On Error Resume Next
'Obtain the full path of the current database or Access Project
strMDBPath = CurrentProject.FullName
'Find the location of the last backslash
intSlashLoc = InStrRev(strMDBPath, "\", Len(strMDBPath))
'Trim off the database name, leaving the path
'and append the name of the image file
strImagePath = Left(strMDBPath, intSlashLoc) & _
Me.Headstamp
'Set ImageFrame to the path of the image file
Me.ImageFrame.Picture = strImagePath
End Function
Thanks,
Scott Doyle