i have a self populating combo box which allows users to choose a database to connect to for back-end data. the list is poulated with databases that they have preiously connected to...
the table the combo box gets its records from includes fields for project name, last date accessed, and a hyperlink field [FilePath] to the file
when a file not found error occurs (files get moved, renamed, deleted...) i wrote a short snippet to delete the record from the table
and to do this, i reference the FilePath hyperlink field of the record (there may potentially be multiple records with the same project name etc.)
initially the variable strFileName (which I've previosly been using in the function) has a value of:
C:/path/file_name.mdb#C:/path/file_name.mdb#
the next line parses the value to be:
C:/path/file_name.mdb
strFileName = Mid(strFileName, InStr(1, strFileName, "#") + 1, Len(strFileName) - InStr(1, strFileName, "#") - 1)
however the following code, which does not result in any error (at least that I can see), does not delete the record
sSQL = "Delete from tblChangeProjectList" & _
" WHERE tblChangeProjectList![FilePath] = '#" & strFileName & "';"
CurrentDb().Execute sSQL, dbFailOnError
after many hours of self-imposed frustration, i give up
if ANYONE has ANY thoughts, they will, in advance, be greatly appreciated
Mark