Bizarre error involving Escape key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please if someone could help me, I am new to access. Thank You!

No programs were changed and for some bizarre reason, just right out of the
blue we started getting a message. So I tracked it down to this:

Private Sub cbxFY_KeyPress(keyascii As Integer)
On Error GoTo cbxfyKeyError
Dim myrs As Recordset
If keyascii = 27 Then
MsgBox "Escape Key Pressed, Loosing Changes!"
Application.Echo False
Me.DefaultEditing = 4
Set myrs = Screen.ActiveForm.RecordsetClone
myrs.MoveFirst
Screen.ActiveForm.Bookmark = myrs.Bookmark
Application.Echo True
Me!START_DATE.SetFocus
Me!cbxFy.Visible = False
Me!FY.Visible = True
Me!cbxTitleBox.Visible = False
Me!TITLE.Visible = True

End If
cbxfykeyexit:
Exit Sub

cbxfyKeyError:
MsgBox Error$
Resume cbxfykeyexit

End Sub

There is no escape key pressed, all of the PC's that are involved are
getting the same error and they are all on this database. This leads me to
beleave that there is a problem with the table or the network itself. Please
if anyone has had this problem please respond as soon as possible. We are
using MS win XP with Access 2003.
Also I would like to mention that the pre. key is set to 9 text in the table
and that there was a value: ASB06.999 so adding one more record would gave
giving it 10 text, so maybe this was doing it, I physically went into the
table and started the number over again to ASB06.000 - ASB06.148 but this did
not change the out come, still we are getting the error. Is there a pointer
that needs to be reset?

Please help Thank You
 
The message is in the body of the subroutine that I have on the question:
If keyascii = 27 Then
MsgBox "Escape Key Pressed, Loosing Changes!"
End If

The only thing is that no one is pressing the Esc Key

Thank You for any help!
 
Back
Top