here is what i did to get what i seed and is working perfect LOL
i used the code to check if there is duplicate currentdb.execute, dbfailonerror
then i created a query to find the duplicate SNs,
SELECT ImportSerial_Shipped.[S/N] AS [Shipped S/N], ImportSerial_Shipped.SalesON AS [Shipped SO]...
a) currentdb.execute, dbfailonerror
I confirm that if you do have an error handler procedure in your code (On Error GoTo ...) it will definitely stop the executing the rest of the code and do whatever you want it to do. but you got to have ,dbfailonerror.
the only reason I don’t...
i hope so,
but yes the code worked and it doesn't find the duplicate but once there one the error msg pop up.
and that exactly what i want.
i tried the loop but it is bit confusing
please if someone has any idea about "is there a way to include the S/N that was duplicated in the error msg? "...
thanks jdraw for the reply,
the [S/N] is the Primary Key in the Serial_Shipped table, but the problem is that the code run with no error even if there is a duplicate. but it doesn't copy the new record instead it keep the old one there.
all i want it to do is the rais an error msg saying the...
I have this code to copy records from the ImportSerial table into ImportSerial_Shipped table where the SO_Finished diff than 11/11/1111
dbs.Execute "INSERT INTO ImportSerial_Shipped SELECT * FROM ImportSerial WHERE ([ImportSerial].[SO_Finished] Not Like " & "'*11/11/1111*'" &...
there is something!!
i change the code, so i only have this 2 line on button click code
and i'm still getting the error at SO_ING_Serial_subform
it says " Can't find the field 'SO_ING_Serial_subform'