Loop understanding issue (1 Viewer)

WineSnob

Not Bright but TENACIOUS
Local time
Yesterday, 22:52
Joined
Aug 9, 2010
Messages
211
I am the first to admit I struggle with looping through records.:banghead:
I am trying to loop through a table and collect external income data and write it to a new table.
My issue may be the way the table is laid out. ???
The attached pictures show the tables. The tblExtInc is where the data are. I am trying to create a table that looks like tblExtIncYr that shows each year and separate entries by item. Thanks in advance for pointing me in the right direction.
How would I loop through tblExtInc and grab ex:$2000 every year for upto 100 years but only get the $1000 for year 6,7,8 only?
I need a push in the right direction. THANKS.
I can post my db with my lousy attempt at it if it will help.
 

Attachments

  • tblExtInc.jpg
    tblExtInc.jpg
    69.2 KB · Views: 68
  • tblextincyr.jpg
    tblextincyr.jpg
    31.3 KB · Views: 57

Mihail

Registered User.
Local time
Today, 05:52
Joined
Jan 22, 2011
Messages
2,373
Can you explain using simple words for those, like me, don't fully understand English ?

What are you trying to achieve ?
To extract those records, from "External Income" field where values are $2000 or $1000 ?
To exctract those records where the External Income is $2000 or Yr = 6,7,8 ?
Anything else ?
 

MarkK

bit cruncher
Local time
Yesterday, 19:52
Joined
Mar 17, 2004
Messages
8,183
You probably don't need a loop or any VBA. You can do most of that work just be writing a query. Maybe muck around in the query design grid a little. Just filter your source table in the query.
 

Users who are viewing this thread

Top Bottom