Sorry if I posted this but still can't find a solution...
I'm using the following code.
Private Sub Msamplenumber1_LostFocus()
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
[Msamplenumber1] = ""
Me.[Msamplenumber1].SetFocus
End Sub
It works but it creates some extra blank records. When I use the same code and put it into a button, it works fine and no blank records.
The reason I want it on Lost Focus is because I'm entering the info in that field with a barcode scanner. That way, after the data is entered, it duplicates the record and is ready for the next record without having to push a button.
It works but those extra records I can't figure out why?
Thanks...
I'm using the following code.
Private Sub Msamplenumber1_LostFocus()
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
[Msamplenumber1] = ""
Me.[Msamplenumber1].SetFocus
End Sub
It works but it creates some extra blank records. When I use the same code and put it into a button, it works fine and no blank records.
The reason I want it on Lost Focus is because I'm entering the info in that field with a barcode scanner. That way, after the data is entered, it duplicates the record and is ready for the next record without having to push a button.
It works but those extra records I can't figure out why?
Thanks...