Hey All,
I have this code to copy records from the ImportSerial table into ImportSerial_Shipped table where the SO_Finished diff than 11/11/1111
So far the coping work fine, but I have a field called S/N that’s cannot be duplicate. And I want to get an Error msg when there is a duplicate
Please assist
Thanks
I have this code to copy records from the ImportSerial table into ImportSerial_Shipped table where the SO_Finished diff than 11/11/1111
Code:
[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] dbs.Execute "INSERT INTO ImportSerial_Shipped SELECT * FROM ImportSerial WHERE ([ImportSerial].[SO_Finished] Not Like " & "'*11/11/1111*'" & ");", False[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]
So far the coping work fine, but I have a field called S/N that’s cannot be duplicate. And I want to get an Error msg when there is a duplicate
Code:
[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] MsgBox "Error Number: " & err.Number & " " & err.Description, vbOKOnly, "Export Failed"[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]
Please assist
Thanks