Results 1 to 4 of 4
  1. #1
    ldodge is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Location
    Wisconsin
    Posts
    43

    Take a little off the top :)

    Hi all--


    I have a field called "ingredients" in which I list all the ingredients of various recipes. I would like to be able to delete all the NFDM (non fat dry milk -- for you non - dairy types hehehe) along with the comma that follows it.
    Ex.:

    Milk, NFDM, Flour, Sugar
    go to:
    Milk, Flour, Sugar

    Any thoughts?
    Thanks in advance
    LCD

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    I have a thought. My first thought is that you should not be storing multiple data in the same field in the same record. So, your table should be storing it like:

    Code:
     
    RecipeID IngredientID
    1               1
    1               2
    1               4
    2               1
    2               4
    2               3

    where the ingredients table is something like
    Code:
    IngredientID      IngredientName
    1                        Milk
    2                        NFDM
    3                        Flour
    4                        Sugar
    and so on. Then it is easy to add, subtract, etc.

  3. #3
    Rhino373 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    65
    I agree with Bob but you should be able to use the Replace() function to achieve this. You'd need to replace the word, comma and trailing space

  4. #4
    ldodge is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Location
    Wisconsin
    Posts
    43
    Thank Bob and Rhino, I will try those as soon as I get a moment
    LCD

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

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