Accessing data from a subform in the parent form's recordset



I have a field in the main DB that is the record ID (autonumber) which is not
displayed on the parent form. But because I have a table relationship setup
with the child table I need to access this field from child form when
inserting records into the child DB. It works if the record is existing and
being edited, but on a insert into the main table it will not be visable to
the child.

I am opening the parent form in Add Mode with the following syntax:
DoCmd.OpenForm "frm_ModifyFirearms", acNormal, , , acFormAdd, acDialog

The field in the main db is firearm_id. The field in the child DB is
weaponid. The subform does have the fileds linked on the parent form.

I hope I made some since of this question. I am new to Access and VBA.

Thanks in advance....
.



Relevant Pages

  • Re: Passing value to modal child form in MS Access using VBA?
    ... Open your parent form in design view. ... Child Fields and Link Master Fields to the Key field of your main ... > button on my parent form which opens my child form filtered on matches to ... > Private Sub Form_Activate ...
    (microsoft.public.access.formscoding)
  • Re: Passing value to modal child form in MS Access using VBA?
    ... Open your parent form in design view. ... Child Fields and Link Master Fields to the Key field of your main ... > button on my parent form which opens my child form filtered on matches to ... > Private Sub Form_Activate ...
    (microsoft.public.access.forms)
  • Re: shared Dataset
    ... > I have a MDI application with a parent form and two child forms. ... > The child forms are called invoiceForm and customerForm ... > Public Shared WithEvents DSCust As New InvoiceWhiz.dsCustomers ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Referening a parent form control from within a child form.
    ... When I load the child form I want to disable a button in the parent form and then re-enable it in the child's formclosed event handler. ... You can do it a variety of ways, but generally you should avoiding exposing the control itself. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Accessing data from a subform in the parent forms recordset
    ... put the record ID on the parent form in a textbox ... Also put the recordID which is the foreign key on the child subform on the ... The link master fields will be firearm_id and the link child fields will be ... drag and drop it on the weaponid in the weapons table. ...
    (microsoft.public.access.formscoding)