A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Run-time error 3426



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2010, 09:14 PM posted to microsoft.public.access
Chip[_3_]
external usenet poster
 
Posts: 54
Default Run-time error 3426

Hey everyone,

I have an error thats popping after a recent update. I have a form,
that I've added a Jump To field. The field is called txtGoTo. Its a
simple Text Box in my form header, the user enters a six digit class
number and the form jumps directly to that class. Everything works
fine and it takes my user to the correct record.

However, when the user then go into the record and edits any field in
the record, and then returns to teh Jump To field, I get an Run-time
error 3426. It says that This action was cancelled by an associated
object. If the suer makes no changes to the record, it still works
fine.

When I hit debug, it takes me to this line

Me.Recordset.Bookmark = rs.Bookmark

The entire block of code for the field is

Private Sub txtGoTo_AfterUpdate()
If (txtGoTo & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[CLASSNUM]=""" & txtGoTo & """"
If rs.NoMatch Then
MsgBox "Sorry, no such record '" & txtGoTo & "' was found.", _
vbOKOnly + vbInformation
Else
Me.Recordset.Bookmark = rs.Bookmark
End If
rs.Close
txtGoTo = Null
End Sub

Could this mean that my form has some setting which disallows changes
to the record? Any help is appreciated as always..

chip
  #2  
Old April 26th, 2010, 03:22 PM posted to microsoft.public.access
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Run-time error 3426

Chip -

Try this:

Me.Bookmark = rs.Bookmark

--
Daryl S


"Chip" wrote:

Hey everyone,

I have an error thats popping after a recent update. I have a form,
that I've added a Jump To field. The field is called txtGoTo. Its a
simple Text Box in my form header, the user enters a six digit class
number and the form jumps directly to that class. Everything works
fine and it takes my user to the correct record.

However, when the user then go into the record and edits any field in
the record, and then returns to teh Jump To field, I get an Run-time
error 3426. It says that This action was cancelled by an associated
object. If the suer makes no changes to the record, it still works
fine.

When I hit debug, it takes me to this line

Me.Recordset.Bookmark = rs.Bookmark

The entire block of code for the field is

Private Sub txtGoTo_AfterUpdate()
If (txtGoTo & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[CLASSNUM]=""" & txtGoTo & """"
If rs.NoMatch Then
MsgBox "Sorry, no such record '" & txtGoTo & "' was found.", _
vbOKOnly + vbInformation
Else
Me.Recordset.Bookmark = rs.Bookmark
End If
rs.Close
txtGoTo = Null
End Sub

Could this mean that my form has some setting which disallows changes
to the record? Any help is appreciated as always..

chip
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.