Error editing a text box "too much data"

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

Guest

I was just informed today that one of my users was unable to correct a typo in a 9-digit field in a form on a database I developed and maintain. I never had this problem when I was testing it, but my workstation has Office97/NT4
The strange thing is that this text box has no problem containing this data item while it is not being edited; the field in the table to which this is bound, is defined as a Text, 9. My user demonstrated this problem in my presence. She chose to Edit this field, (which unlocks it), and tried first to correct just the incorrect digit, and got an Access message box (not one of my handlers) that she has tried to insert or paste too many characters. There is no input mask on that field in the table, or the control; I wrote various validation routines for this field that execute when the user tries to save a record. I had her try to wipe out the whole number and type the whole correct number, but she immediately got the same error message from Access
I am wondering if there is a version problem involved. The database is split; both frontend and backend are '97, but the user has Access2000 (her OS is Windows2000). Please advise, thanks.
 
Is this a bound field or an unbound one?

The message in question should never occur for a bound field. Access stops
you entering more than the specified maximum # of characters. If it is an
unbound field, "all bets are off", and you have to check the length
programatically, if you want to avoid that error. It does seem odd, however,
that the field would display a value, but not let you replace a character
within that value - if there is no input mask etc.

Personally, I would place a BeforeUpdate event on the field, with the
following statement:

msgbox ">" & screen.activecontrol.text & "<"

Then you will see precisely wat text Access will try to store in the field.

HTH,
TC
(off for the day)


F. Barth said:
I was just informed today that one of my users was unable to
correct a typo in a 9-digit field in a form on a database I developed and
maintain. I never had this problem when I was testing it, but my
workstation has Office97/NT4.
The strange thing is that this text box has no problem containing
this data item while it is not being edited; the field in the table to which
this is bound, is defined as a Text, 9. My user demonstrated this problem
in my presence. She chose to Edit this field, (which unlocks it), and tried
first to correct just the incorrect digit, and got an Access message box
(not one of my handlers) that she has tried to insert or paste too many
characters. There is no input mask on that field in the table, or the
control; I wrote various validation routines for this field that execute
when the user tries to save a record. I had her try to wipe out the whole
number and type the whole correct number, but she immediately got the same
error message from Access.
I am wondering if there is a version problem involved. The
database is split; both frontend and backend are '97, but the user has
Access2000 (her OS is Windows2000). Please advise, thanks.
 
TC replied:
-----Original Message-----
Is this a bound field or an unbound one?
It's a bound field, that is what is so crazy about
getting this message. However, I printed out your
BeforeUpdate suggestion and will try it tomorrow. Thanks.
 
Back
Top