updating records in a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to do something which seems simple, but I'm stumped. I want to
update records in a table according to records in the table. I have a field
with numbers and rows with 0's below it (ie 1st row is 5 and the next five
records are 0's, then the next record is 6 followed by 4 0's.) What I want to
do is make another table that will count the 0's below each number and put
that number in a new field. Using the previous example the new table would
have one column containing a 5 in the 1st row and a 6 in the second row and
then the next column would contain a 5 in the 1st row (count of the 0's
above), and the next row would contain a 4 (count of the 0's. Hope this makes
sense. I am thinking it will be a Do-Loop, but I'm not that advanced in VB
and this is ACCESS 97.
Any help will be great. Thanks!
 
Records are not ordered per se. What would define the order here, that
makes you say 'below'?

In general, you can find the number of records with certain criteria
using an aggregate query (click the sigma button in the design view, or
use the GROUP BY clause when editing the SQL)

It will be possible to do this in VBA of course; but you should consider
using a(n update) query first.
 
Back
Top