
Update does not stick, AddNew won't add
VB6 SP5 Access 2000 On a form when I change a record, the change shows up.
When I leave the program and come back, the change is gone, and the original
data is back.
Text boxes are bound to DB. I make the changes and click a command button
with code
"Adodc1.Recordset.Update"
"Adodc1.Recordset.Delete" works fine.
"Adodc1.Recordset.AddNew" creates an error, here is the code:
Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum,
ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal
pRecordset As ADODB.Recordset)
With Adodc1.Recordset
If .EOF Or .BOF Then
Text2.Text = ""
Else
====> Text2.Text = .Fields("REF").Value <====
End If
End With
End Sub
====> This is what is highlighted on error <====
Run Time error 94
Invalid use of null
Help