Hi all!!
I found my in position to ask for your assistance!
I have a form(frmTable2, in DatasheetView) set to Append NewRecords to other tables and Update the Oldrecords as might be required.
On the AfterInsert Event I have the following Code!
AfterUpdate Event set the following Code
They are both works fine if you enter the data one by one!
AfterInsert Event Never triggered if you decide to paste the data(form on DatasheetView) instead of typing one record after another.
Is there any means of Iterating all fields so that to force the AfterInsert Event, even if you PASTE the data to the forms???
I found my in position to ask for your assistance!
I have a form(frmTable2, in DatasheetView) set to Append NewRecords to other tables and Update the Oldrecords as might be required.
On the AfterInsert Event I have the following Code!
Code:
INSERT INTO tblMytable ( ID, Code, SName, IDNumber, DateOfBirth) SELECT tblTable1.ID, tblTable1.Code,tblTable2.SName, tblTable2.IDNumber, tblTable2.DateOfBirth, FROM (tblDepartment INNER JOIN tblTable1 ON tblDepartment.DeptID = tblTable1.DeptID) INNER JOIN tblTable2 ON tblDepartment.DeptID = tblTable2.DeptID WHERE (((tblTable2.[SID])=[Forms]![frmTable2]![SID]));
Code:
UPDATE tblDepartment INNER JOIN (tblTable2 INNER JOIN (tblTable1 INNER JOIN tblMytable ON tblTable1.Code = tblMytable.Code) ON tblTable2.[SID] = tblMytable.[SID]) ON (tblDepartment.DeptID = tblTable2.DeptID) AND (tblDepartment.DeptID = tblTable1.DeptID) SET tblMytable.[SName] = [tblTable2].[SName], tblMytable.[IDNumber] = [tblTable2].[IDNumber], WHERE (((tblMytable.[SID])=[Forms]![frmTable2]![SID]));
AfterInsert Event Never triggered if you decide to paste the data(form on DatasheetView) instead of typing one record after another.
Is there any means of Iterating all fields so that to force the AfterInsert Event, even if you PASTE the data to the forms???
Comment