MrMerlotti
Technical User
I am using a disconnected recordset bound to a DS form. I would like to append a new field to the recordset, bind that form to a text box on the form and allow the user to enter a value, which is reflected in the underlying disconnected recordset.
Everything else seems to work OK - the code runs without errors, but the control bound to the new field just displays #Name? and is not updatable.
A sample of the code below - in the Form_Open event
Any help much appreciated!
PS My thanks to jordanking for pointing me in the direction of Disconnected Recordsets (thread705-1446576)
Everything else seems to work OK - the code runs without errors, but the control bound to the new field just displays #Name? and is not updatable.
A sample of the code below - in the Form_Open event
Code:
rsSELECT = "SELECT * FROM tblPO"
Dim cn as ADODB.Connection
Dim rsPO as ADODB.Recordset
Set cn = CurrentProject.Connection
Set rsPO = New ADODB.Recordset
With rsPO
.Source = rsSELECT
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.CursorLocation = adUseClient
.Fields.Append "OrderWgt", adInteger
.Open
End With
Set rsPO.ActiveConnection = Nothing
Set Me.Recordset = rsPO
Any help much appreciated!
PS My thanks to jordanking for pointing me in the direction of Disconnected Recordsets (thread705-1446576)