populating a query

  • Thread starter Thread starter Victoria
  • Start date Start date
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
 
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
 
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

Similar Threads

crosstab query? 12
corresponding data query 8
join with different number of rows 7
Sumif function in Access 2
Really need query help!! 2
Delete Chart 7
Format data to columns 1
Select records with similar data 5

Back
Top