I am attempting to update data contained in a subform and I am getting the error:
Field 'Fieldname' is based on an expression and can't be edited.
I am populating the subform with the following code:
What is it that I am missing in this?
Robotron
Field 'Fieldname' is based on an expression and can't be edited.
I am populating the subform with the following code:
Code:
Private Sub SetSubFormRecordSource()
On Error GoTo Err_SetSubFormRecordSource
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.CursorLocation = adUseClient
rst.Open "SELECT * FROM tblDetail " _
& "WHERE [Sys Emp ID Num] = '" _
& Forms("frmReconciliationDispositionGL")!txtSysEmpIdNum & "' " _
& "ORDER BY Year, Month ", cnn1
Set Me.frmEmpDetail.Form.Recordset = rst
Me.frmEmpDetail.Requery
rst.Close
Set rst = Nothing
Exit_SetSubFormRecordSource:
Exit Sub
Err_SetSubFormRecordSource:
If Err.Number = 3709 Then ' MyConn = nothing
OpenConnection
Resume
Else
MsgBox Err.Description, , Err.Number
Resume Exit_SetSubFormRecordSource
End If
End Sub
What is it that I am missing in this?
Robotron