Removing Control Characters from Text Boxes

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

Guest

I have an issue where the users are cutting/pasting text, from emails, and
Access is returning an error that the field is too small to accept the data
they are attempting to 'add'.

The text is obviously not too long, so I am assuming that there are unwanted
control characters, coming over in the paste process.

Could someone offer some suggested code that will remove any unnecessary
control characters? I'm guessing it will probably use the Replace command,
but I have no idea about syntax.

Thanks, in advance.

Sharkbyte
 
I have an issue where the users are cutting/pasting text, from emails, and
Access is returning an error that the field is too small to accept the data
they are attempting to 'add'.

The text is obviously not too long, so I am assuming that there are unwanted
control characters, coming over in the paste process.

Could someone offer some suggested code that will remove any unnecessary
control characters? I'm guessing it will probably use the Replace command,
but I have no idea about syntax.

Thanks, in advance.

Sharkbyte

you could
1. create a new function that receives a string and returns a string
2. create an array of the characters you want to get rid of inside the
function
3. loop through the array, running Replace on your input string until
you get to the end of the array of characters.
4. return the finished string
 
Back
Top