Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2012
    Posts
    7

    Unanswered: Update all fields for matching ID

    Hi,

    Sure there is a simple way to do this but its got me flummoxed!

    I want to run an update query that will copy the same value into all fields based on a matching ID.

    I.e. When I allocate Customer IDs to Class Numbers for a particular Week Number, copy the class numbers to all further week numbers for those customers

    Hope that makes sense!

    Thanks for your help

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    YOu can use an Update Query. The general syntax would be
    Code:
    Currentdb.Execute "UPDATE YourTableName SET YourField = "Whatever new value you want" WHERE RecordID = 5", dbFailOnError
    Linq ;0)>


    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jan 2012
    Posts
    7
    Thanks for your response linq,

    Sorry but could you advise how i can put that into an update query builder?

    Bear in mind that i need to update the class numbers for all future week numbers for each Customer ID.

    I.e. I don't want to specify a particular ID number in the query but rather say : update ALL records by copying the class number for each Customer for a particular week number to all future week numbers (or even just to the next week number)

    Does that make sense!?

Posting Permissions

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