I have a module that I am using to verify that file paths in my table point to valid jpg files. The table has grown quite a bit since I first created the module and it has gotten to the point where it's taking too long for the module to execute. I'm in the process of trying to change the record set for the module from the table to a stored query procedure but it's turning out to be a little tricky for me. When I execute the following module, I'm not getting any error code, it just doesn't seem to do anything at all. The bits in red are the parts I've changed. Before that the module executed as I expected it would.
Any thoughts?
Thanks!
Any thoughts?
Thanks!
Code:
Sub TestIt2()
Dim strFileName As String
[COLOR=red] Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("QryUpdateRevisionHistory")[/COLOR]
'With CurrentDb.OpenRecordset("Select * From tblLabels")
[COLOR=red] With rs[/COLOR]
Do Until .EOF
' This not only turns error display off it also sets Err.Number to 0
On Error Resume Next
strFileName = Mid(!LabelImg, InStrRev(!LabelImg, "\") + 1)
.Edit
!LabelImage = Dir(Nz(!LabelImg, "\")) = strFileName And Err.Number = 0
.Update
.MoveNext
Loop
End With
End Sub