[AccessD] How do YOU handle child table population?
Bill Benson
bensonforums at gmail.com
Sat Mar 25 14:22:19 CDT 2017
I recall in working with unbound forms and controls i would create new
records with recordset object and .Addnew then .Update, then set the
recordsource sgain and use .FindFirst and recordsetclone, bookmark, update
controls on the form and leave the user in edit mode from there. Roughly,
it's from memory.
>From my non-flammable Note 3,
Bill Benson
On Mar 24, 2017 3:24 PM, "Ryan W" <wrwehler at gmail.com> wrote:
As you all know, if you have a table that's a child of another, meaning
there's a PK/FK relationship between them, Access won't populate the child
table with data until a piece of information is entered (a checkbox
checked, a combo box filled out, etc) if it's got a form related to it.
Example:
frm_Quote is my quotes form.
frm_QuoteChecklist is the subform on a tab control within that quote form.
Tables:
Quote
QuoteChecklist
Quote - QuoteID PK
QuoteChecklist - QuoteID FK
My manager has asked me to "fill in defaults" for QuoteChecklist once a
quote has been inserted. Normally one might use the "default value" option
in the table layout, in this case SQL Server.
BUT... those defaults still don't actually populate/do anything until
something on frm_QuoteChecklist is manipulated, right?
So.. my question to you is how would YOU handle this?? My initial thought
is to have a insert trigger on the Quote table to insert the QuoteID_FK
into the QuoteChecklist table so that the defaults can populate and the
relationship happen.
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list