Newbie HELP

Results 1 to 2 of 2

Thread: Newbie HELP

  1. #1
    Join Date
    Dec 1969

    Default Newbie HELP

    What is the prefered way to compare one record to the next in an Access db.<BR><BR>I want to basically say...<BR><BR>Do this stuff for ID number 4... until the ID number changes.<BR>Then do the same for ID number 53 etc.<BR><BR>So as long as the ID number in the db is the same, stay in the loop. Otherwise, kick out of the loop, insert another statement and then kick back in to the loop again for *that* ID number.<BR><BR>If you could offer any suggestions, I would appreciate it!<BR><BR>I want to campare the ID number to the ID number of the next record, if it is the same, stay in the loop... If it is different, then do something else...<BR><BR>

  2. #2
    SPG Guest

    Default RE: Newbie HELP

    I&#039m confused by your question, but I do know that<BR><BR>objConn.execute "update [myTable] set foo = bar, bar = foo where id = 4"<BR><BR>will update all records (setting foo to bar and bar to foo for better or worse) in a similar fashion where the ID is 4, no silly loops required.<BR><BR>Hope it helps.

Posting Permissions

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