Results 1 to 6 of 6

Thread: Deleting Quotes

  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unanswered: Deleting Quotes

    Hello;

    I am importing a text file into Access, however, the imported text shows quotes at every text feild. Can you give me some code or any idea to delete all the qutoes frm the table without using the Find and Replace function to find all the quotes and replace them with a blank?

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091

    Re: Deleting Quotes

    Originally posted by smasila
    Hello;

    I am importing a text file into Access, however, the imported text shows quotes at every text feild. Can you give me some code or any idea to delete all the qutoes frm the table without using the Find and Replace function to find all the quotes and replace them with a blank?
    Not sure what you mean by "blank" - do you mean a space?
    (i.e brown"cow"s becomes brown cow s)

    If this is the case, then use this code and assign to a button:

    Sub ReplaceDblQuoteSp()
    Cells.Replace What:="""", Replacement:=" ", LookAt:=xlPart, SearchOrder _
    :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
    End Sub


    Or do you mean eliminate the spcae that the quote held?
    (i.e brown"cow"s becomes browncows)

    If the latter, then you can use this code and assign it to a button:

    Sub ReplaceDblQuote()
    Cells.Replace What:="""", Replacement:="", LookAt:=xlPart, SearchOrder _
    :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
    End Sub

    =============================

    Edited]

    Sorry, I misread your OP, thinking you wanted this done in Excel. Rereading your post now, I realize you want this done in Access, not Excel. I will be back.
    Last edited by shades; 11-04-03 at 11:41.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  3. #3
    Join Date
    Oct 2003
    Posts
    1,091
    In Excel, are the cells formatted as General or as Text?
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  4. #4
    Join Date
    Oct 2003
    Posts
    2
    NO...I am importing a TEXT file into ACCESS. Then in Access, I wanna do a macro that will replace ALL qutotes with blank.

    "784745 -> 784745

    I can use the FIND and REPLACE function, but I think using the macro will be easier. That code give to me did not work.


    Thnaks

  5. #5
    Join Date
    Oct 2003
    Posts
    1,091
    Guess I was under the impression that since this was an Excel forum thread, that you would do this in Excel. Perhaps you can re-ask in the Access Forum.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  6. #6
    Join Date
    Sep 2003
    Location
    Brooklyn, NY
    Posts
    3

    Re: Deleting Quotes

    Originally posted by smasila
    Hello;

    I am importing a text file into Access, however, the imported text shows quotes at every text feild. Can you give me some code or any idea to delete all the qutoes frm the table without using the Find and Replace function to find all the quotes and replace them with a blank?
    Hi, I can't quite understand what you need done, but I will suggest what I think may be a solution:

    Create an action query (in design view of the query, choose Query | Update Query)

    Fill in the corresponding fields appearing in the grid below

    Good luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •