I change and still inserting but not updateing,
If DCount("*", "cost", "order_no='" & Me.Text0 & "' AND pallet_cost=" & Me.Text2) = 0 Then
DoCmd.SetWarnings False
DoCmd.RunSQL "insert into cost ([order_no], [pallet_cost]) Values ([Forms]![Form3]![Text0], [Forms]![Form3]![Text2])"...