update next row

S

shank

I need to update a field in a table I use for grooming data.

Something like...
IIF (Row1.PO=Row2.PO,Row1.InvNo,Row1.InvNo+1)
....and it would loop through all rows and stop at last row

How do I accomplish that with an UPDATE query?

After update, data gets exported then deleted.

thanks!
 
J

John W. Vinson

I need to update a field in a table I use for grooming data.

Something like...
IIF (Row1.PO=Row2.PO,Row1.InvNo,Row1.InvNo+1)
...and it would loop through all rows and stop at last row

How do I accomplish that with an UPDATE query?

After update, data gets exported then deleted.

thanks!

You don't, because - unlike a spreadsheet - tables have no row numbers and no
defined order of records.

Please explain the structure of the table. A Self Join query may be the
solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top