T
Tom
Instead of using the "Me.Requery" on the form, I use the
function below (****) for requerying the form.
This will allow me to "stay" on the current record (after
requerying) instead of "jumping" back to the first record.
I now realize, however, that the function throws an error
if the table is completely empty and I requery the first
record.
The error is: "Update or CancelUpdate without AddNew or
Edit" (error 3020).
Now, in the form's OnError event, I have put the
following:
If DataErr = 3020 Then
Response = acDataErrContinue
End If
..... however, I now cannot change any other field values
in the form anymore.
Does anyone know how to either modify the function below
or simply ignore the error message and allowing me to
continue to make changes to the 1st record?
Thanks in advance,
Tom
&&&&&&&&&&&&&&&&&&&&&&&&&
Object (DAO) 3.6 Library in the References Collection:
****
Dim rs As DAO.Recordset
Dim lngID As Long
With Me
lngID = .AutoNumberFieldName
.Requery
DoEvents
Set rs = .RecordsetClone
rs.FindFirst "[AutoNumberFieldName] = " & lngID
If rs.NoMatch = False Then
.Bookmark = rs.Bookmark
End If
End With
****
function below (****) for requerying the form.
This will allow me to "stay" on the current record (after
requerying) instead of "jumping" back to the first record.
I now realize, however, that the function throws an error
if the table is completely empty and I requery the first
record.
The error is: "Update or CancelUpdate without AddNew or
Edit" (error 3020).
Now, in the form's OnError event, I have put the
following:
If DataErr = 3020 Then
Response = acDataErrContinue
End If
..... however, I now cannot change any other field values
in the form anymore.
Does anyone know how to either modify the function below
or simply ignore the error message and allowing me to
continue to make changes to the 1st record?
Thanks in advance,
Tom
&&&&&&&&&&&&&&&&&&&&&&&&&
Object (DAO) 3.6 Library in the References Collection:
****
Dim rs As DAO.Recordset
Dim lngID As Long
With Me
lngID = .AutoNumberFieldName
.Requery
DoEvents
Set rs = .RecordsetClone
rs.FindFirst "[AutoNumberFieldName] = " & lngID
If rs.NoMatch = False Then
.Bookmark = rs.Bookmark
End If
End With
****