[AccessD] Second Try

John Colby jwcolby at gmail.com
Fri Mar 11 10:00:42 CST 2022


well it seems I didn't read well enough.  Sorry.  TBH though now I am just
confused what you are doing.  You are opening "Order_Detail_Frm" twice...

On Thu, Mar 10, 2022 at 7:51 PM Arthur Fuller <fuller.artful at gmail.com>
wrote:

> Earlier today I posted a message, or thought I did, but haven't seen it
> appear yet, so I'm resending it.
>
> I have a form in datasheet format. It's actually a subform. The bottom row
> contains the word New. When I click this, I open a single-row form that
> allows editing or addition, depending on the argument I pass. The problem
> is that when adding a new row, the form does not inherit the parent key.
> For example, if I'm trying to add an Order Detail, it does not inherit the
> Order_ID. I have tried a few approaches but am not getting what I want.
>
> This does not work.
> <code<
>     DoCmd.OpenForm "Order_Detail_frm", View:=acNormal, DataMode:=acFormAdd
>     Me.Order_ID = Me.Parent.OrderID
> '    DoCmd.OpenForm "Order_Detail_frm", acNormal, , "ID=" & Me.ID,
> acFormEdit, acDialog
> </code>
> Any suggestions?
>
> Arthur
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list