DoCmd.RunSQL "INSERT INTO Guarantee ( CustID, [Unit No], [Warranty No], [Start Date], [End Date], Period, [Value], [Serial No], Company ) SELECT Forms!Guarantee!Customer,DMax("[Warranty No]", "Guarantee", "[Company] = '" & Me.Company & "'") + 1, Forms!Guarantee!start, Forms!Guarantee!end...