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  

populating a query



 
 
Thread Tools Display Modes
  #1  
Old April 26th, 2010, 07:55 PM posted to microsoft.public.access.queries
Victoria
external usenet poster
 
Posts: 114
Default populating a query

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
  #2  
Old April 26th, 2010, 08:09 PM posted to microsoft.public.access.queries
vanderghast
external usenet poster
 
Posts: 593
Default populating a query

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" wrote in message
...
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


  #3  
Old April 26th, 2010, 08:50 PM posted to microsoft.public.access.queries
Victoria
external usenet poster
 
Posts: 114
Default populating a query

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


"vanderghast" wrote:

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" wrote in message
...
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


 




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 05:05 AM.


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