A.D.TEJPAL
adtp at airtelbroadband.in
Fri Jul 6 14:10:05 CDT 2007
Susan, My sample db named FormsSubformsReference might be of interest to you. It is available at Rogers Access Library (other developers library). Link - http://www.rogersaccesslibrary.com/OtherLibraries.asp#Tejpal,A.D. The db covers all likely combinations of origin & destination controls located on the parent as well as subforms representing different levels of nesting. Nesting upto three levels deep is represented. It presents a visual ready reckoner as well. On selection of origin & destination controls, corresponding VBA code gets displayed simultaneously - at the bottom. Apart from showing the required syntax for (a) referring to controls of one group of nested subforms from another group of nested subforms and (b) referring to subroutines (contained in form's modules) across various levels of nested subforms, the sample db demonstrates the syntax for referring controls on forms / nested subforms in SQL statements. Dbl clicking any text box on main parent form or various nested subforms at left, causes its value to be picked up by the query, results of which, are displayed in the innermost nested subform at right. Simultaneously, the SQL used in source query, gets displayed at bottom. Best wishes, A.D.Tejpal --------------- ----- Original Message ----- From: Susan Harkins To: 'Access Developers discussion and problem solving' Sent: Friday, July 06, 2007 23:39 Subject: [AccessD] Syntax for referencing subform in a subform I just wrote a quick entry on referencing subforms and a reader wants to know how to reference a subform in a subform. Frankly, I don't think I've ever tried -- I can't remember one single time when I've created a subform in another subform. Since a subform is a control in the form, what's a subform in another subform -- can a control have dependent controls? Susan H.