Hi,
I am having some trouble with this code, the code is supposed to change the form to show the record which is selected from a list box. The code appears to work with some records but on some occasions it just appears to come up with the error:
Runtime Error '3020':
Update or CancelUpdate without AddNew or Edit
Any help with why this is occuring and a solution would be greatly appreciated.
Please see code below:
The debug seems to happen where i have made the text bold.
Thanks
Stuart
I am having some trouble with this code, the code is supposed to change the form to show the record which is selected from a list box. The code appears to work with some records but on some occasions it just appears to come up with the error:
Runtime Error '3020':
Update or CancelUpdate without AddNew or Edit
Any help with why this is occuring and a solution would be greatly appreciated.
Please see code below:
Code:
Private Sub List76_AfterUpdate()
'Find the record that matches the control.
Dim rs As Object
Dim PRN As String
PRN = Str(Nz(Me![List76], 0))
Set rs = Me.Recordset.Clone
rs.FindFirst "[Project Reference Number] =" & PRN
If Not rs.EOF Then Me.Bookmark = [B]rs.Bookmark[/B]
End Sub
The debug seems to happen where i have made the text bold.
Thanks
Stuart