daniels012
Technical User
In this code It's not taking me to the new record. I see it add the data with the new number WIL-216. Then I start to edit the sheet and I find I am in record WIL-215. I can scroll and get to WIL-216, but sheet doesn't automatically go there? Any help would be great.
I guess I need something to take me to the new record??
Thank You,
Michael
Code:
Private Sub CopySample_Click()
Me!SampleNumber.SetFocus
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
DoCmd.GoToControl "SampleNumber"
a = Split([SampleNumber], "-")
a(1) = a(1) + 1
[SampleNumber] = Join(a, "-")
End Sub
I guess I need something to take me to the new record??
Thank You,
Michael