Set Focus to New Record

D

dd

I have a form where allow additions = false. A button
called "Add New" can be clicked and the code behind it is
Me.AllowAdditions = True. A new record then opens but I
cannot find a way to set focus to the new record. The form
is continuous and it contains only one text box which
displays all of the records in the form. I need to find a
way to set the focus to the record which contains no data.
Thanks, and happy weekend.
 
W

Wayne Morgan

DoCmd.GoToRecord acDataForm, Me.Name, acNewRec

Place this in the button's code after the Me.AllowAdditions line.
 
Top