Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

copy/pasting invalid characters

Posted on 2004-09-23
2
Medium Priority
?
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

721 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