Solved

copy/pasting invalid characters

Posted on 2004-09-23
2
174 Views
Last Modified: 2011-10-03
I have a user that copies and pastes her email into a memo field.  The email has characters that cause the record to become corrupt.  Is there any way to strip out these characters before saving without knowing what they are?
0
Comment
Question by:Deebz
2 Comments
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12135195
jadedata mentioned a while ago that directly updating a memo field can cause corruption. You might want to try using an unbound form to enter data and then using a recordset to update the data in your table.
0
 
LVL 8

Accepted Solution

by:
JonoBB earned 500 total points
ID: 12135292
Something like this?

Dim FindTerm(13)
Dim strMemoField as string

'Set invalid characters to replace
    FindTerm(0) = "*"
    FindTerm(1) = "@"
    FindTerm(2) = "\"
    FindTerm(3) = "("
    FindTerm(4) = ")"
    FindTerm(5) = "["
    FindTerm(6) = "]"
    FindTerm(7) = "?"
    FindTerm(8) = "<"
    FindTerm(9) = ">"
    FindTerm(10) = "!"
    FindTerm(11) = "{"
    FindTerm(12) = "}"
    FindTerm(13) = ":"

'Work on the field
   strMemoField = me.txtMemoField
   For i = 1 To 13
     strMemoField = Replace(strMemoField, FindTerm(i), " ")
   Next

'Put the data back
  me.txtMemoField = strMemoField    

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now