Adding a unique number

  • Thread starter Thread starter Helen
  • Start date Start date
H

Helen

Hi there,

I'm trying to get my head around a project and was hoping someone could
start me off in the right direction.

We run something called Staging Reports used for shipping. The Staging
Report includes one or more Sales Reports. I already have this process fully
functional. In short - The user enters Sales Order(s) on a Form. The Form is
then used as criteria for an Append query which collect Sales Order(s) data
from several Live tables onto a temporary table. Finally the Staging Report
is created off this temporary table. Once the report is done, the data in
the temporary table is deleted.

I would like to add a feature to the process which assigns and stores a
unique number to the Staging Report (and it's Sales Order(s)) in a table. I
could then later create a query and look at a Staging Report and see what
Sales Order(s) where included and vice versa. I think maybe that this could
be accomplished somehow after the Live data has been added to the temporary
table, using yet another append or update query, but I can't seem to figure
out how.

I've got so far to create a new table that will store my Staging Number and
it's Sales Order(s) data. I know how to append the Sales Order info to this
new table, but I don't know how to assign the unique Staging Number.

Any suggestions are greatly appreciated. (Hope I'm making sense!)

Thanks,

Helen
 
CDbl(Now()) is a Double number that is unlikely to be duplicated on a
single computer. There is a possiblity of duplicated numbers being
created if several computers are used simultaneously to create these
numbers. You would need to calculate and store the value in a variable
if you want to use it in several places, so that it doesn't change
each time that you use it.

Autonumber fields in tables are unique. You could generate a new
record in a table, then query the table to determine what autonumber
had been generated. This technique could be used in a shared database
so that several computers could create the numbers simultaneously.



Hi there,

I'm trying to get my head around a project and was hoping someone could
start me off in the right direction.

We run something called Staging Reports used for shipping. The Staging
Report includes one or more Sales Reports. I already have this process fully
functional. In short - The user enters Sales Order(s) on a Form. The Form is
then used as criteria for an Append query which collect Sales Order(s) data
from several Live tables onto a temporary table. Finally the Staging Report
is created off this temporary table. Once the report is done, the data in
the temporary table is deleted.

I would like to add a feature to the process which assigns and stores a
unique number to the Staging Report (and it's Sales Order(s)) in a table. I
could then later create a query and look at a Staging Report and see what
Sales Order(s) where included and vice versa. I think maybe that this could
be accomplished somehow after the Live data has been added to the temporary
table, using yet another append or update query, but I can't seem to figure
out how.

I've got so far to create a new table that will store my Staging Number and
it's Sales Order(s) data. I know how to append the Sales Order info to this
new table, but I don't know how to assign the unique Staging Number.

Any suggestions are greatly appreciated. (Hope I'm making sense!)

Thanks,

Helen

**********************
(e-mail address removed)
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
 
Back
Top