Append query not working, giving error: can't append all the records in the append query ! (1 Viewer)

sibbbra

Member
Local time
Today, 00:28
Joined
Feb 11, 2022
Messages
78
hi,
I have aform in my attached DB , named ''All Office And Labor Expences''. There is an append query called C-Add to append certain data from the table Labor_Expenses to the table Transport_Expenses. but its not working and giving the error messeage, it can't append all the records in the append query.
plz help
DB attached
thanx
 

Attachments

  • Hannan.accdb
    5.6 MB · Views: 247

Gasman

Enthusiastic Amateur
Local time
Today, 00:28
Joined
Sep 21, 2011
Messages
14,299
You cannot, and should not, even if you could, append the autonumber field.

INSERT INTO Transport_Expenses ( Employee_ID, Travel_Date, Expence_ID )
SELECT Labor_Expenses.Employee_ID, Labor_Expenses.Pay_Date, Labor_Expenses.Expence_ID
FROM Labor_Expenses
WHERE (((Labor_Expenses.Expence_ID) Like [Forms]![All Labor Expenses]![Expence_ID]));
 

Eugene-LS

Registered User.
Local time
Today, 02:28
Joined
Dec 7, 2018
Messages
481
I have aform in my attached DB , named ''All Office And Labor Expences''
There is no form named "All Office And Labor Expences" in Your attached DB ...
But there is "All Labor Expences"
 

GPGeorge

Grover Park George
Local time
Yesterday, 16:28
Joined
Nov 25, 2004
Messages
1,867
hi,
I have aform in my attached DB , named ''All Office And Labor Expences''. There is an append query called C-Add to append certain data from the table Labor_Expenses to the table Transport_Expenses. but its not working and giving the error messeage, it can't append all the records in the append query.
plz help
DB attached
thanx
Unfortunately, the basic table design is inappropriate in a few different ways, and that complicates things. But here, as gasman already pointed out, you are trying to append a Primary Key from one table, "Labor_Expenses" into the Primary Key of a different table, "Transport_Expenses" and that won't work, nor does it make sense to try to do that. It'll take a while to try to sort out what all this application is supposed to be doing, but to help with that, could you provide a short narrative explaining the business goal and business rules being applied? Thanks for helping solve the problem.
 

Users who are viewing this thread

Top Bottom