Full Version: Selecting A Record Copies It To Another Table...
UtterAccess Forums > Microsoft® Access > Access Forms
toons
Here is what I am trying to do
. I open a form that I will be entering client transmittal data into, which will automatically assign a transmittal number to the new record. The main transmittal information will be stored in XMIT table. There is another table that stores information for documents we have in our possession. Each document has it's own record in that second table, DOCS.
2. there will be a button on the transmittal form that, when clicked, will open a form that lists all of the documents in datasheet view (or a form/subform setup).
I'm going to have the transmittal number for the current transmittal being created to appear in a xmit_id field in that popup datasheet, so the documents chosen will have that xmit number assigned to it. The goal is to...
click on a document record in that datasheet, have it ask 'are you sure?' to verify the selection and if confirmed, it will copy that document record from table DOCS to a table called XMIT_DOCS. XMIT_DOCS has all the same fields as table DOCS, so no data will be lost. However, when it is copied to the new table after being selected, the transmittal number would have also saved into the xmit field of table XMIT_DOCS so when I print the transmittal, it will list out all of the documents that were selected for it on the transmittal.
I have to have it copy the record to a new table simply because the same documents can be sent over and over again to different transmittal numbers, which will save to those copied records when I select them for the transmittal I am working on at that time. Then I can also have the abiliy later on to view old transmittals and see what documents were sent with each. The only thing that I just can't figure out is the select record/ copy to new table function. All of your help is greatly appreciated.
MikeLyons
Why not just have a separate table that records the transmittals and relate it back to the table that contains the document? that way you need only store one copy of the document in the database but can add as many related transmittal records as needed.
ike
toons
the documents themselves won't have unique IDs in the DOCS table. Ive thought about that. basically, the DOCS table will contain an uploaded data dump from an external source, so a unique ID field wouldn't work since every time the records were deleted and uploaded the ID would be changing in that main DOCs table
toons
any idea on this one? Could a macro do it? If, by clicking a button on form 1 opens the distribution list or document list, could a macro copy a record from 1 table to another by just clicking on said record and confirming the selection?
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.