Adding new record in Subform

  • Thread starter Thread starter mary
  • Start date Start date
M

mary

ok I am not sure if this is possible.
I have subform and i want add data but as I add data it
updates into two tables - as well i want to initially
have that subform opened by an add record (below) in the
mainform --
and match to a field in the main form --
is this possible?

Please - I need help desperately - thank you thank you.
Mary
 
Use as the recordsource of the subform a query that is based on the two
tables. To start a new record in a subform by clicking a button on the main
form, you can use code similar to this:

Private Sub cmdButton_Click()
Me.Subform.SetFocus
DoCmd.RunCommand acCmdRecordsGoToNew
End Sub

Where Subform is the name of the subform control (the one that holds the
subform).

You can link the subform to a field on the main form by using the Link Child
Fields and Link Master Fields properties of the subform control.
 
Back
Top