number records in temp table

B

Broken Coder

Hope this isn't a duplicate, I posted but it error'ed out....

I am working with a table of trainees that is used for keeping track of
members of a training class. There are several trainees added every 2 weeks,
and they are grouped effectively enough by hire date, until now. Now I have
need to number off each member of these classes 1,2,3,4,etc.

I have a temp table set up that pulls the members names out for each class,
and have no problem updating this back in to the master table, but I cannot
figure out how to have the recordset tick off +1 for each record. I thought
about using the autonumber and subtracting the Min value for each record to
get them a new value, but that is uncertain using autonumber. Is there a way
to have the records number themselves off?

I will need this class member numbering to work up daily pairings using a
function I kind of already have worked out using a date increment shifting.
I just need each member to have a unique number WITHIN the class group. I
will have no problem with assigning this number once then leaving it in the
master table...that will work best, actually.

Ideas? Am I on the right track with the master table and can I do it all
with a stepping query or do I need to pull a form? I thought I had found an
answer to this but am having no luck re-locating this...I looked at Allen's
stuff and am not sure it will get me there. My results would look something
like this:

11/01/09 class:
Trainee1 1
Trainee2 2
Trainee3 3
etc...
and then 11/14/09 class:
Trainee1 1
Trainee2 2
Trainee3 3
etc.

Thanks in advance, you guys are great!
 
B

Broken Coder

the number must be stored somewhere, since I will be using it in another
function later. I looked at the running total feature, but I need this
stored back in to the table as a future reference for calculations and it
needs to remain constant once assigned. As long as it is assigned once, that
is fine, if there is a way to pass the value back into the table.... I
haven't messed with reports that much other than print/review reports so I'm
unsure on passing that back. Can I build a query into the report's code to
update the table?
 
B

Broken Coder

OK...I figured it out, so I thought I'd post to follow up.

I ended up going with stacked queries. I pulled a query to group the class
together, then used Stephen Lebans' code 'serialize' function to number the
records off based on an autonumber field. One quick update query later
(update table for each record in serialized query) and the numbers were
assigned to the master table.
 

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


Top