G
Guest
Hello,
I have a database that uses an image frame to display a photo in my form. I
converted my database to Access 97 and now am getting a few errors. First,
97 did not like "CurrentProject.FullPath", so I changed it to
"CurrentDB.Name". This then spawned an error at the InStrRev function, so I
changed it to just InStr. Now I get a message that says "13 Type Mismatch"
whenever I try to move between records. And of course, the photo's don't
show up. Should I resign myself to having to type in the full path for the
photos? Any ideas on making relative paths work?
Thanks,
Melinda
PS: Here's the chunk of code in question.
(strImagePath, 1) = "\" Then
' Path is relative
strDatabasePath = CurrentDb.Name
intSlashLocation = InStr(strDatabasePath, "\",
Len(strDatabasePath))
strDatabasePath = Left(strDatabasePath, intSlashLocation)
strImagePath = strDatabasePath & strImagePath
I have a database that uses an image frame to display a photo in my form. I
converted my database to Access 97 and now am getting a few errors. First,
97 did not like "CurrentProject.FullPath", so I changed it to
"CurrentDB.Name". This then spawned an error at the InStrRev function, so I
changed it to just InStr. Now I get a message that says "13 Type Mismatch"
whenever I try to move between records. And of course, the photo's don't
show up. Should I resign myself to having to type in the full path for the
photos? Any ideas on making relative paths work?
Thanks,
Melinda
PS: Here's the chunk of code in question.
(strImagePath, 1) = "\" Then
' Path is relative
strDatabasePath = CurrentDb.Name
intSlashLocation = InStr(strDatabasePath, "\",
Len(strDatabasePath))
strDatabasePath = Left(strDatabasePath, intSlashLocation)
strImagePath = strDatabasePath & strImagePath