populating a query

V

Victoria

hi
I think this is a beginner's question, but I'm missing something. Lets say
I have a table:

empID(pk) Max_ACount
123 5
136 2
154 3

How can I generate this Query?

empID ACount
123 1
123 2
123 3
123 4
123 5
136 1
136 2
154 1
154 2
154 3

For any given empID, ACount runs from 1 to Max_ACount

thank you in advance
Victoria
 
V

vanderghast

Easier if you have a driver table at your disposal:

Have a table, iotas, one field, iota, the primary key, with values from 1
to, say 1000 (can be filled from an Excel column where you will generate
that sequence).

Make a new query.
Bring iotas and the original table.
In the grid, bring empID and iota.
Under iota, add the criteria : <= [yourTableNameHere].[Max_ACount]


That's about it.


Vanderghast, Access MVP
 
V

Victoria

Perfect! after I sorted empID and iota ASC, this did the job.
Thank you - Victoria


vanderghast said:
Easier if you have a driver table at your disposal:

Have a table, iotas, one field, iota, the primary key, with values from 1
to, say 1000 (can be filled from an Excel column where you will generate
that sequence).

Make a new query.
Bring iotas and the original table.
In the grid, bring empID and iota.
Under iota, add the criteria : <= [yourTableNameHere].[Max_ACount]


That's about it.


Vanderghast, Access MVP



Victoria said:
hi
I think this is a beginner's question, but I'm missing something. Lets
say
I have a table:

empID(pk) Max_ACount
123 5
136 2
154 3

How can I generate this Query?

empID ACount
123 1
123 2
123 3
123 4
123 5
136 1
136 2
154 1
154 2
154 3

For any given empID, ACount runs from 1 to Max_ACount

thank you in advance
Victoria
 

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