If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Update all fields for matching ID

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-12, 06:47
sidbrown sidbrown is offline
Registered User
 
Join Date: Jan 2012
Posts: 7
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
Reply With Quote
  #2 (permalink)  
Old 01-14-12, 10:17
Missinglinq Missinglinq is offline
Registered User
 
Join Date: Jun 2005
Location: Richmond, Virginia USA
Posts: 1,702
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 Devil's in the Details!!

All posts/responses based on Access 2000/2003
Reply With Quote
  #3 (permalink)  
Old 01-14-12, 12:31
sidbrown sidbrown is offline
Registered User
 
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!?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On