[AccessD] Conditional subforms

jwcolby jwcolby at colbyconsulting.com
Fri Jun 19 05:03:38 CDT 2009


ROTFL.  No foreign key!

John W. Colby
www.ColbyConsulting.com


Jim Lawrence wrote:
> Thank you very much Stuart. Now that was simple so now I can resolve the
> cascading SubForm problem. 
> 
> Unfortunately, I can proceed no further for the moment as the client has not
> given me 'Carte blanche' to make any major changes... any changes for that
> matter as he is afraid the whole project will go off the rails like with the
> last programmer. ;-)
> 
> Wouldn't you guess; there is no foreign key and data is incomplete...
> 
> Jim
>   
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
> Sent: Thursday, June 18, 2009 6:04 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Conditional subforms
> 
> My standard way of doing this doesn't need any code, just:
> 
> 1. Create a hidden textbox on the parent form "txtsubForm1Link" and set its
> source to  "= 
> frmsubForm1.Form!fldPK"
> 
> 2. Set the "Link Master Field" of subForm2 to "txtsubForm1Link" and the
> "Link Child Field" 
> to the foreign key in Form2.
> 
> It's all automagic from then.
> 
> I often do this to several levels of cascaded continuous forms on an unbound
> parent form 
> where there is a need to maintain the data in a hierarchy of related tables.
> 



More information about the AccessD mailing list