Results 1 to 8 of 8
  1. #1
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41

    find and replace

    hi,

    how do you use a query for the find and replace function



    thanks!

  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    You can use and update query for this.

    Google: access 2003 update where
    http://www.techonthenet.com/access/queries/update2.php

    also try https://www.accessforums.net/showthr...es-it-not-work

  3. #3
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41
    hi....umm i have a very stupid doubt here....how do i make a query with a code, i have all this while being making a query in design view itself...
    thanks!

  4. #4
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41
    also...what i want to find is not the whole cell, but only a part of the cell..

    e.g. the entry in the table is 'i love ice-cream'

    where i want to find 'ice-cream' and replace it with 'chocolate'

  5. #5
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    Is it static, i.e will it always be find 'ice-cream' and replace it with 'chocolate'? or will it change to different things?

    Also it helps if you give your table structure and field name, then we might be able to give you a more specific answer.

    The more detail you give about your problem, the more detail we can give you on how to solve it.

    It might be worth you having a look at this too
    http://www.brainbell.com/tutorials/m...te_Queries.htm

  6. #6
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41
    it is static
    i want to change all the cells in a table that have 'i love icecream' or 'i love pizza' to 'i love chocolate'.

    my table has two columns.
    the first column has a person's name and the second has either 'i love icecream' or 'i love pizza'
    that's it


  7. #7
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    I'm going to make some examples here then.

    lets say your table is called Tbl_test

    Tbl_test

    Fields

    First_Name, Remarks


    Then for your basic example it could be accomplished with

    UPDATE Tbl_test SET Tbl_test.Remarks = "I Like Chocolate"
    WHERE (((Tbl_test.Remarks) Like "*" & "ice cream" & "*"));

    I have enclosed a sample so you might see how it is done better
    Attached Files Attached Files

  8. #8
    rohini is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    41
    i dint realize you would understand it this way..sorry my mistake.sorry sorry
    well the problem statement is actually as follows:
    i have stuff like " i love icecream", "he loves icecream", "she loves icecream", etc and i want to change only the icecream part

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Find and Replace Within a Macro
    By bmschaeffer in forum Access
    Replies: 1
    Last Post: 12-20-2011, 11:27 AM
  2. Find and Replace
    By Bedsingar in forum Access
    Replies: 1
    Last Post: 08-14-2011, 01:10 PM
  3. Dumb question about find/replace
    By Perplexed in forum Access
    Replies: 11
    Last Post: 08-04-2010, 09:53 AM
  4. Find and Replace Query
    By randolphoralph in forum Queries
    Replies: 4
    Last Post: 03-17-2010, 07:25 AM
  5. Applying a find/replace function
    By Arr in forum Programming
    Replies: 2
    Last Post: 10-12-2009, 12:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums