Hi,
im trieing to update some attributes in a table, but i keep getting the error that the record, im seeking does not exists (EOF)
i have a list, and i want to update all attributes related to a meeting.
i tried the following:
i prefer a query. But that didnt work eigther
i tried: 'cn.Execute "UPDATE Minutes SET Minutes.MinutesID = " & strFinal & " WHERE (Minutes.MinutesCode)= " & [Forms]![MinutesMF]![itemlist].Column(4) & ";"
but the string contains spaces that need to be there, and because of that, the query wont run.
hope that some can help me out.
thanks in advance
im trieing to update some attributes in a table, but i keep getting the error that the record, im seeking does not exists (EOF)
i have a list, and i want to update all attributes related to a meeting.
i tried the following:
Code:
rivate Sub Command22_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Set cn = CurrentProject.Connection
rs.Open "Minutes", cn, adOpenKeyset, adLockOptimistic, adCmdTableDirect ' open it
cn.BeginTrans
rs.Index = "MinutesCode"
For y = 0 To Me.itemlist.ListCount - 1
rs.Seek (key)
If rs.EOF Then
MsgBox "Employee not found."
End If
rs!MinutesID = strFinal
rs.Update
DoCmd.Requery ("itemlist")
Exit_Command22_Click:
Exit Sub
Err_Command22_Click:
MsgBox Err.Description
Resume Exit_Command22_Click
End Sub
i prefer a query. But that didnt work eigther
i tried: 'cn.Execute "UPDATE Minutes SET Minutes.MinutesID = " & strFinal & " WHERE (Minutes.MinutesCode)= " & [Forms]![MinutesMF]![itemlist].Column(4) & ";"
but the string contains spaces that need to be there, and because of that, the query wont run.
hope that some can help me out.
thanks in advance