Copy Data from One table to another

  • Thread starter Thread starter Greg McLandsborough
  • Start date Start date
G

Greg McLandsborough

I trying to create a Document Transmittal, from a Document Register. The
Document Transmittal must contain the revision number of the document at the
date of the transmittal. The Document Register's Revision will change over
time.

How can I copy the current revision into the Document Transmittal ?

Thanks for any Help

Regards

Greg
 
Greg,

I'm assuming you have two tables; one for the document, and one for the
document version info. I further assume your DocVersion table has a foreign
key to DocumentID in the document table. If that's what you have then the
answer is simple; just use a joined query to return, not only the document
information, but also the latest version information.

SELECT tblDocument.*,
tblDocVersion.VersionNo,
Max(tblDocVersion.VersionDate) As LatestVersionDate
FROM tblDocument
INNER JOIN tblDocVersion
ON tblDocVersion.DocumentID = tblDocument.DocumentID

Or you can simply do a lookup on the DocVersion table:
DMax("VersionNo", "tblDocVersion", "DocumentID = " & lngDocumentID)

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 
No that no really what I want.

I have the Document Register connected to Autocad, and when a document is
updated, the document is reved up. (and the document register is updated by
Autocad).

The Document Transmttal however needs to contain the Revision Number for the
date of the transmittal issue.

Therefore I need to copy revision number on the date of the document
transmission from the document register.

Hope this makes a little more sense.
 
Greg,

So are you now saying the register is in ACAD or Access? You need to provide
enough specific information up-front, to allow us to help you.

Where does the register database reside? In ACAD or Access? What is the
table schema? What/where is the transmittal?

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
---------------------------
 
Back
Top