A
Ann
I have an Access form. When I finished entering data for
a record, I hit enter then it gives error message:
Microsoft Visual C++ Runtime error
Porgram:C:\program files\Microsoft office\Msaccess.exe
abnormal program termination.
I applied office service pack1 , but still has the same
problem.
The last field I entered data has event procedure as
followings, don't know if it cause the problem or other
reason:
Private Sub Difference_AfterUpdate()
Dim curRec As Long
Dim StartValue As Single
Dim curRecs As DAO.Recordset
If Me.NewRecord Then
Me.Recalc
Set curRecs = Me.Recordset
curRecs.MoveFirst
curRecs.MoveNext
curRecs.Edit
StartValue = curRecs("Starting_Balance")
curRecs("Current") = False
curRecs.Update
curRecs.MovePrevious
curRecs.Edit
curRecs("Starting_Balance") = curRecs
("Difference") + StartValue
curRecs("Current") = True
curRecs.Update
End If
Thanks for suggestions.
a record, I hit enter then it gives error message:
Microsoft Visual C++ Runtime error
Porgram:C:\program files\Microsoft office\Msaccess.exe
abnormal program termination.
I applied office service pack1 , but still has the same
problem.
The last field I entered data has event procedure as
followings, don't know if it cause the problem or other
reason:
Private Sub Difference_AfterUpdate()
Dim curRec As Long
Dim StartValue As Single
Dim curRecs As DAO.Recordset
If Me.NewRecord Then
Me.Recalc
Set curRecs = Me.Recordset
curRecs.MoveFirst
curRecs.MoveNext
curRecs.Edit
StartValue = curRecs("Starting_Balance")
curRecs("Current") = False
curRecs.Update
curRecs.MovePrevious
curRecs.Edit
curRecs("Starting_Balance") = curRecs
("Difference") + StartValue
curRecs("Current") = True
curRecs.Update
End If
Thanks for suggestions.