Removing Control Characters from Text Boxes

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
 
P

pietlinden

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
 

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

Top