I can use the following connection string to write to all fields but not the field [Actions Taken] field that is Append Only with Versioning turned on:
Code:
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = Application.CurrentProject.Connection
Set rs = New ADODB.Recordset
Dim strRS As String
strRS = "SELECT qryJD_SRs.* FROM qryJD_SRs WHERE qryJD_SRs.ID=" & Me.ID
rs.Open strRS, cn, adOpenKeyset, adLockOptimistic
This line of code works to write data to a field:
Code:
rs.Fields("Details").Value = "Test Details Field"
This line of code does not work:
Code:
rs.Fields("Actions Taken").Value = "Test Actions Taken Field"
Both the [Details] and the [Actions Taken] fields are Memo and Rich Text. The [Actions Taken] field is Append Only = Yes
If I use DAO the following will write data to a field:
Code:
Private Sub addNewAction_Click()
Dim rs As DAO.Recordset
Dim strSQL As String
strSQL = "SELECT * FROM [Service Requests] WHERE [Service Requests].ID = " & Me.ID
Set rs = DBEngine(0)(0).OpenRecordset(strSQL, dbOpenDynaset)
With rs
.Edit
![Details] = "Monday test"
.Update
End With
rs.Close
Set rs = Nothing
End Sub
Unfortunately, this DAO below will NOT write data to the Append Only field:
Code:
Private Sub addNewAction_Click()
Dim rs As DAO.Recordset
Dim strSQL As String
strSQL = "SELECT * FROM [Service Requests] WHERE [Service Requests].ID = " & Me.ID
Set rs = DBEngine(0)(0).OpenRecordset(strSQL, dbOpenDynaset)
With rs
.Edit
![Actions Taken] = "Monday test"
.Update
End With
rs.Close
Set rs = Nothing
End Sub
Any suggestions?...JD