Creating Multiple New Records based on User Input

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that stores information on specific items made. Items have
unique serial numbers which serves as the primary key. As soon as the order
is taken, I know what the serial number will be and want to create the
corresponding db record immediately (i.e. weeks or months before the actual
piece is made).

A project may have thousands of pieces that require a serial number, so I'm
trying to avoid having the user key in the individual serial numbers. I have
developed the code/loop that creates the serial number, but I cannot figure
out how to assign the serial number to a new record. (i.e. I can make it
work in Excel using VBA, but not in Access.) I could export the serial
numbers from Excel into Access, but I'm trying to eliminate that step by
doing it all in Access.

Help me work smarter, not harder.

Thanks.
 
I have a table that stores information on specific items made. Items have
unique serial numbers which serves as the primary key. As soon as the order
is taken, I know what the serial number will be and want to create the
corresponding db record immediately (i.e. weeks or months before the actual
piece is made).

A project may have thousands of pieces that require a serial number, so I'm
trying to avoid having the user key in the individual serial numbers. I have
developed the code/loop that creates the serial number, but I cannot figure
out how to assign the serial number to a new record. (i.e. I can make it
work in Excel using VBA, but not in Access.) I could export the serial
numbers from Excel into Access, but I'm trying to eliminate that step by
doing it all in Access.

You can't do it in a Table - tables have no useable events. But you can easily
do it in a Form. Have a textbox bound to the serial number field, and set its
value to the calculated serial number in some appropriate event - the form's
BeforeInsert event if you'll be entering other fields would be simplest.

John W. Vinson [MVP]
 
Back
Top