Results 1 to 2 of 2
  1. #1
    Jamescdawson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    South Wales, UK
    Posts
    98

    Post Using "Update Query" to add data to a field...

    (In the Subject/Header, I typed Date...... Not Date.... Data !!!



    Hoping someone might be able to give me some guidance...

    I have a Table with about 20 fields. The table has about 83,000 records. One of the fields ... We'll call the field "HCodes" contains text (e.g "H5" or "H7 8" or something similar). There is a range of about 12 different codes.

    For reasons too boring to go into, I need to find a way of looking at the HCodes field and then, based on that field's contents, inserting a corresponding code into a second field... We'll call this second field "HPCodes".

    I think this can be done using an Update Query, but I'm not sure how to go about it.

    I can't paste the HP codes into the HPCode field manually, because it will take too long...

    Had I been dealing with an Excel spreadsheet, I would have simply filtered the spreadsheet according to each HCode, entered the HPCode into the next cell and "Filled Down", but we cannot "fill down" in Access (more's the pity!).

    So, in summary, I need my query to look at the HCodes field and then update the HPCode field according to the content of the HCode field.

    I hope this makes sense to someone (?)

    Example....

    HCode Field HPCode Field

    H5 HP5

    H5 6 7 HP5, HP6, HP7

    H8, 14, 15 HP8, HP14, HP15

    I guess that I could also copy and paste the content of HCOodes to HPCodes and then do a find and replace, but it doesn't seem to elegant.

    Thanks for your consideration.

    Jimbo
    Last edited by RuralGuy; 11-11-2016 at 08:53 PM. Reason: Fixed Subject line

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    yes , use an update query. Tho from your example, I cant figure out the field to update result.

    If HCODE = h5, what is HCODES supposed to be?
    or
    is HCODES several items in a single field?

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

Similar Threads

  1. Replies: 4
    Last Post: 12-20-2015, 12:16 PM
  2. Replies: 3
    Last Post: 02-16-2015, 01:04 PM
  3. Replies: 3
    Last Post: 12-06-2014, 03:59 AM
  4. Replies: 2
    Last Post: 09-29-2012, 11:22 PM
  5. Replies: 6
    Last Post: 07-25-2012, 06:42 AM

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