the_net_2.0
Banned
- Local time
- Yesterday, 20:57
- Joined
- Sep 6, 2010
- Messages
- 812
hello all,
I have been working for a while and cannot fix this small issue. I have the following code and I'm getting the error in the thread title on the line in red. can someone help me out?
I have been working for a while and cannot fix this small issue. I have the following code and I'm getting the error in the thread title on the line in red. can someone help me out?
Code:
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tagattribsbu")
Dim rs2 As DAO.Recordset
Set rs2 = CurrentDb.OpenRecordset("attribs")
Dim i As Long
Dim strattrib As String
Dim strtag As String
Dim strvalues() As String
rs.MoveLast
rs.MoveFirst
Do Until rs.EOF
strvalues() = Split(rs!aValue, " ")
For i = LBound(strvalues) To UBound(strvalues)
If InStr(strvalues(i), "<") = 0 Or InStr(strvalues(i), ">") = 0 Then
[COLOR="DarkRed"][COLOR="Red"]strattrib = Left(strvalues(i), InStr(strvalues(i), "=") - 1)[/COLOR][/COLOR]
strtag = Left(strvalues(i), InStr(strvalues(i), " ") - 1) & ">"
If (Len(strattrib) - InStrRev(strattrib, """")) <> InStr(strattrib, """") Then
Debug.Print strattrib & " (need values)"
End If
If InStr(strvalues(i), "NOEVENTS") > 0 Then
CurrentDb.Execute "UPDATE tags SET " & _
"tags.hasevents = 0 WHERE " & _
"tags.tag = '" & strtag & "'"
Else
CurrentDb.Execute "UPDATE tags SET " & _
"tags.hasevents = -1 WHERE " & _
"tags.tag = '" & strtag & "'"
End If
rs2.AddNew
rs2!Tag = strtag
rs2!attrib = strattrib
rs2.Update
End If
Next i
rs.MoveNext
Loop
rs.Close
rs2.Close
Set rs = Nothing
Set rs2 = Nothing