Solved How to insert data at one go in both the parent table and child table in Microsoft Access (1 Viewer)

ebs17

Well-known member
Local time
Today, 08:16
Joined
Feb 7, 2020
Messages
1,946
quite frankly your code does not make sense as written
To underline the content:
INSERT INTO [tblJobWorks]
- versus -
NewID = DLast("ID", "tblJobcosting")

How does tblJobWorks write to tblJobcosting so that something usable can be read from tblJobcosting?

Think before coding.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:16
Joined
Feb 19, 2002
Messages
43,275
If you're going to use an unreliable method instead of @@Identity, at least use DMax() rather than DLast()
 

nector

Member
Local time
Today, 09:16
Joined
Jan 21, 2020
Messages
368
Many thanks Minty this will help alot
 

Users who are viewing this thread

Top Bottom