Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the same ID in 3 Access tables. 1

Status
Not open for further replies.

WeyHey

IS-IT--Management
Feb 6, 2002
5
GB
I have 3 tables in an access database. The main database pers_details has an autonumber ID that is my main Unique ID. I want to automatically populate this ID number in to 2 other tables NATAuditChecks and NARAdditional when I create a new record in a Form.

I use a query to pull the recordset which works if I only use two tables. I have adjusted the qry for 3 tables but I cannot update the recordset.

The query being used is below.

SELECT Pers_details.*, [NAR additional].*, NATAuditChecks.*, Pers_details.[Area/Qual code]
FROM Pers_details LEFT JOIN ([NAR additional] LEFT JOIN NATAuditChecks ON [NAR additional].[Apex ID] = NATAuditChecks.[Apex ID]) ON Pers_details.[Apex ID] = [NAR additional].[Apex ID]
WHERE (((Pers_details.[Area/Qual code]) Like "NAR"));

It is a simple table setup I just want to hit add a record once and populate the ID in the other tables so that I can later edit them in other forms.

If I manually edit the tables I can edit the records by using a (dynaset with inconsistent).

Any suggestions greatly appreciated.

John.
 
hi WeyHey,

If you use the After Inset event of the form driving the first table to run a make table query to make a temp table to hold the new ID number and two append queries to append a new record to the other two tables and then two update queries to update these numbers to the value of the temp table ID that should do it. All the best jobo123.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top