I have the following code that does the following
Loop through a table that contains ".jpg". When found, run my MetaTag procedure. Next I want to update the record with the MetaTag info.
I can get the first part to work but some how can't see what I am missing to get the UPDATE query to work.
When I run the UPDATE query, this is what I get:
Plus I get a missing parameter error concerning the UPDATE query.
Thanks again for the help.
Loop through a table that contains ".jpg". When found, run my MetaTag procedure. Next I want to update the record with the MetaTag info.
I can get the first part to work but some how can't see what I am missing to get the UPDATE query to work.
Code:
Private Sub Command50_Click()
Dim db As dao.Database
Dim rs As dao.Recordset
Dim txtTags As String
Dim strSQL As String
Set db = CurrentDb
Set rs = db.OpenRecordset("Catalog")
rs.MoveLast
rs.MoveFirst
Do While Not rs.EOF
If InStr(1, rs!FPath, ".jpg") Then
txtTags = getFileMetadata(GetFolder(rs!FPath), GetFileName(rs!FPath), "photo")
Debug.Print (rs!FPath)
Debug.Print (txtTags)
strSQL = "UPDATE Catalog SET Catalog.Tags = " & " txtTags " & " WHERE Catalog.FPath = rs!FPath;"
CurrentDb.Execute strSQL
End If
rs.MoveNext
End Sub
When I run the UPDATE query, this is what I get:
Code:
"UPDATE Catalog SET Catalog.Tags = txtTags WHERE Catalog.FPath = rs!FPath;"
Plus I get a missing parameter error concerning the UPDATE query.
Thanks again for the help.