DebPepDevuan
DebPepDevuan

Reputation: 489

Create a New Record in a SubForm on button click MS Access 2013 VBA

I have a main form called MForm on that form I have a subform that is a datasheet called SForm.

What I would like to do: On MForm I have a button called cmdNew when I click that button I would like to create a new record inside subform.

But I am not sure what the VBA would look like in order to make that happen.

Upvotes: 1

Views: 3553

Answers (1)

DebPepDevuan
DebPepDevuan

Reputation: 489

On the button all you need to do is this:

Me!SForm.SetFocus
DoCmd.GoToRecord , , acNewRec

Upvotes: 1

Related Questions