J
John Baker
I would like to be able to add a button to a form which has code behind it
to add a new record to a subform. I will then be programmatically placing
data into the fields of the new record on the subform.
My problem is, how do I put a new record into the subform. I have been
trying to use
docmd.GoToRecord acform, "MySubFormname", acNewRecord
I also tried "forms!myForm!SubformName!subformcontrol.form.MySubformName"
as the form name, but in each case I get a type mismatch.
How can I use the docmd.GoToRecord to add a new record to a subform? (or is
there a better way?)
to add a new record to a subform. I will then be programmatically placing
data into the fields of the new record on the subform.
My problem is, how do I put a new record into the subform. I have been
trying to use
docmd.GoToRecord acform, "MySubFormname", acNewRecord
I also tried "forms!myForm!SubformName!subformcontrol.form.MySubformName"
as the form name, but in each case I get a type mismatch.
How can I use the docmd.GoToRecord to add a new record to a subform? (or is
there a better way?)