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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|