hansaplast
Programmer
Hi,
I want to update a record before I move to a next one.
I have an unbound field in my form where u can type a record number. The form then displays this record and a user can make changes. Below is the function I use to move to another record. This works ok. I'm using an ODBC-database on a remote server. When the server reports an error (on an update for example) the error is truncated by Access. I found this strange so I thought that perhaps I'm not updating my records correctly.
Perhaps someone knows a better way to do this. Also let me know, if you know why the errorstring is truncated by Access. I've already posted a message regarding this problem but got no answers ( thread181-217299 ).
Private Sub colnum_info_AfterUpdate()
On Error GoTo Err_colnum_info_AfterUpdate
Dim rs As Object
Set rs = Me.Recordset.Clone
If Not IsNull(Me.colnum_info) Then
rs.FindFirst "[colnum] = " & str(Me.colnum_info)
End If
Me.Bookmark = rs.Bookmark
Exit_colnum_info_AfterUpdate:
Exit Sub
Err_colnum_info_AfterUpdate:
MsgBox Err.Description
Resume Exit_colnum_info_AfterUpdate
End Sub
Thanks
I want to update a record before I move to a next one.
I have an unbound field in my form where u can type a record number. The form then displays this record and a user can make changes. Below is the function I use to move to another record. This works ok. I'm using an ODBC-database on a remote server. When the server reports an error (on an update for example) the error is truncated by Access. I found this strange so I thought that perhaps I'm not updating my records correctly.
Perhaps someone knows a better way to do this. Also let me know, if you know why the errorstring is truncated by Access. I've already posted a message regarding this problem but got no answers ( thread181-217299 ).
Private Sub colnum_info_AfterUpdate()
On Error GoTo Err_colnum_info_AfterUpdate
Dim rs As Object
Set rs = Me.Recordset.Clone
If Not IsNull(Me.colnum_info) Then
rs.FindFirst "[colnum] = " & str(Me.colnum_info)
End If
Me.Bookmark = rs.Bookmark
Exit_colnum_info_AfterUpdate:
Exit Sub
Err_colnum_info_AfterUpdate:
MsgBox Err.Description
Resume Exit_colnum_info_AfterUpdate
End Sub
Thanks