S
sjw
At work I use Windows 2000 and Access 2000.
I have a form with a text box for comments. When the user clicks save, an
update query opens saving the contents to comments field of a table. The
table field is a text type with a field size of 255.
Every things works as expected until the user exceeds 127 charters in the
text box and click save. This generates a 2486 error (unable to complete)
and locks up the program. This is repeatable on any of our computers at work
(all Windows 2000). I can however copy and paste the text directly into the
field if I open the table.
The problem does not occur at home where I use Windows XP Pro and Access 2003.
I created a new test database with the same results except the error number
is not show. The error message indicates the action will reset the current
code in the break mode but it doesn't. The query is a saved query I build in
the table view. SQL statement of the query is:
UPDATE tblX SET tblX.[Desc] = [forms]![frmX].[txtX]
WHERE (((tblX.ID)=GetID()));
Here is the rest of code from the test database:
frmX Module
Option Compare Database
Option Explicit
Private db As DAO.Database
Private rst As DAO.Recordset
Private Sub Form_Open(Cancel As Integer)
Set db = CurrentDb
Set rst = db.OpenRecordset("tblX", dbOpenDynaset)
rst.MoveFirst
g_ID = rst.Fields(0)
txtX.Value = rst.Fields(1)
End Sub
Private Sub btnUpdate_Click()
DoCmd.OpenQuery "qryX"
End Sub
Module1
Option Compare Database
Option Explicit
Public g_ID As Integer
Public Function GetID() As Integer
GetID = g_ID
End Function
Any help is appreciated.
OBTW If I change the field type to memo, the problem does not occur until
thousands of characters are entered.
I have a form with a text box for comments. When the user clicks save, an
update query opens saving the contents to comments field of a table. The
table field is a text type with a field size of 255.
Every things works as expected until the user exceeds 127 charters in the
text box and click save. This generates a 2486 error (unable to complete)
and locks up the program. This is repeatable on any of our computers at work
(all Windows 2000). I can however copy and paste the text directly into the
field if I open the table.
The problem does not occur at home where I use Windows XP Pro and Access 2003.
I created a new test database with the same results except the error number
is not show. The error message indicates the action will reset the current
code in the break mode but it doesn't. The query is a saved query I build in
the table view. SQL statement of the query is:
UPDATE tblX SET tblX.[Desc] = [forms]![frmX].[txtX]
WHERE (((tblX.ID)=GetID()));
Here is the rest of code from the test database:
frmX Module
Option Compare Database
Option Explicit
Private db As DAO.Database
Private rst As DAO.Recordset
Private Sub Form_Open(Cancel As Integer)
Set db = CurrentDb
Set rst = db.OpenRecordset("tblX", dbOpenDynaset)
rst.MoveFirst
g_ID = rst.Fields(0)
txtX.Value = rst.Fields(1)
End Sub
Private Sub btnUpdate_Click()
DoCmd.OpenQuery "qryX"
End Sub
Module1
Option Compare Database
Option Explicit
Public g_ID As Integer
Public Function GetID() As Integer
GetID = g_ID
End Function
Any help is appreciated.
OBTW If I change the field type to memo, the problem does not occur until
thousands of characters are entered.