A Microsoft Office (Excel, Word) forum. OfficeFrustration

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   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

update next row



 
 
Thread Tools Display Modes
  #1  
Old December 3rd, 2009, 03:47 AM posted to microsoft.public.access.queries
shank
external usenet poster
 
Posts: 113
Default update next row

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!


  #2  
Old December 3rd, 2009, 06:55 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default update next row

On Wed, 2 Dec 2009 21:47:15 -0500, "shank" wrote:

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.
--

John W. Vinson [MVP]
 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.