Henry Simpson
hsimpson88 at hotmail.com
Tue Apr 29 21:25:40 CDT 2003
If the subform is always only a subform and others are forms, you can pass in a delimited list of elements that include Parent form name, subform control name and add a .form. The bigger problem arises when you have multiple instances of a form that runs such a procedure. In that case, you need to pass in a reference to the calling form itself, or better yet, references to the controls that have properties to be set in the input form. If you want to use a modal/dialog form (it can be pop up without being modal), which you would in the ordinary course of events for this kind of interaction, then any code which opens the input form pauses as it calls 'OpenForm' so it is not possible to pass in anything but strings in OpenArgs. An alternative is to open the form as a pop up and disable or hide other open forms. In that case, the code that opens the input form can pass in object variables to its own controls via a public procedure or a property procedure on that input form in the lines immediately following the OpenForm call. That will work no matter what level of subform nesting or which or several open instances of a calling form is involved. A hack solution to allow use of a modal form is to use broadly scoped variables and set them immediately before opening the modal input form. The modal form should clear them in clean up when it closes to cut down on scope contention issues. Just make sure you don't use these variables for anything else. Hen >From: "Stuart McLachlan" <stuart at lexacorp.com.pg> >Reply-To: accessd at databaseadvisors.com >To: "John Bartow" <john at winhaven.net>, accessd at databaseadvisors.com >Subject: RE: [AccessD] Retrofit form issue >Date: Wed, 30 Apr 2003 07:35:34 +1000 > >On 29 Apr 2003 at 16:16, John Bartow wrote: > > > Stuart, Andy: > > Thanks for the ideas! > > > > I used the openargs method and that worked pretty easily. > > > > If I call this popup from a subform what would you suggest? > > > >me.parent.name ? > > > >-- >Lexacorp Ltd >http://www.lexacorp.com.pg >Information Technology Consultancy, Software Development,System >Support. > > > >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail