Overflow error

  • Thread starter Rohan via AccessMonster.com
  • Start date
R

Rohan via AccessMonster.com

I have a memo field in the database that is linked to a textbox in a form.

At the moment the problem field has 32,649 characters in it, and has the
following
code on the get focus:

Private Sub titleholder_notes_GotFocus()
Me!titleholder_notes.SelStart = Len(Me!titleholder_notes & "")
End Sub

Which gives an error: Runtime error : 6, Overflow.

Can't work out why... Any clues ?

Rohan.
 
M

missinglinq via AccessMonster.com

Are you sure about that figure of 32,649? I couldn't reproduce your with a
memofield that size, nor with one at 32,767 characters. But I could with a
memo field of 32,768! And that's because the value of .SelStart has to be an
INTEGER! And the maximum for an Integer is 32,767! And yes, I actually tested
this out! Had, for testing purposes a while back, a memofield with about 19,
000 characters. Put a text box on my form to show the length of the field and,
guessing that problem was the integer thing, adjusted field length to test it.
I've got your same problem, which is to say I use the exact same routine to
do the same thing. I'll have to change it to test the length and set SelStar
to 32,767 if the field is over that length. As you might guess, I have no
social life at this point in time!
 
M

missinglinq via AccessMonster.com

Oh, forgot to say: Error 6, Overflow in Access generally means you're trying
to stuff too much of something into something! In this case, too large a
number into an Integer!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
R

Rohan via AccessMonster.com

missinglinq said:
Oh, forgot to say: Error 6, Overflow in Access generally means you're trying
to stuff too much of something into something! In this case, too large a
number into an Integer!

So how do I fix it ? Declare the variable as something else ?

Rohan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top