[AccessD] Adding a record in a datasheet subform

Arthur Fuller fuller.artful at gmail.com
Thu Mar 10 09:21:46 CST 2022


I'm using a subform in datasheet format, whose bottom row contains the word
New. when I click this, a form opens that displays all the fields. I'm
having trouble populating the parent key. When I open the single form, the
parent key (FK) is blank.

I have tried this:
<code>
    DoCmd.OpenForm "Order_Detail_frm", View:=acNormal, _
            DataMode:=acFormAdd
    Me.Order_ID = Me.Parent.OrderID
</code>

Which doesn't work. Any suggestions?

-- 
Arthur


More information about the AccessD mailing list