Find Forms With Subforms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve

    #1

    Find Forms With Subforms

    Is there a way to programatically determine if a closed form has one or more
    subforms and if it does output the source object of the subform control(s)?
    I can't open the form and iterate through the form's controls collection
    because the form has an open event that opens a dialog form that provides
    parameters to the rowsource of the form.

    Thanks!

    Steve


  • Arvin Meyer [MVP]

    #2
    Re: Find Forms With Subforms

    The open event does not fire if the form is opened in design view, but I
    don't think that you expressly need to open it anyway. Iterating through
    first the form controls looking for a controlype of acSubform will find the
    correct object. Then you must access the form property of the control to
    output the source object.
    --
    Arvin Meyer, MCP, MVP
    Database Consulting, Business Computer Solutions in Orlando, FL MCP, MVP, Networking, Computers, consulting

    Microsoft Access FAQ Site. This website is designed to help Microsoft Access developers find answers to some common development issues. Plenty of code samples, wizards, tips, bug listing, and of course links. If you can't find the answers here, make sure you visit one of the several Access newsgroups. The site is managed by Dev Ashish.

    Database Consulting, MVP, consulting



    "Steve" <nonsense@nomse nse.comwrote in message
    news:182dnXGMEf fE1GzVnZ2dnUVZ_ tfinZ2d@earthli nk.com...
    Is there a way to programatically determine if a closed form has one or
    more subforms and if it does output the source object of the subform
    control(s)? I can't open the form and iterate through the form's controls
    collection because the form has an open event that opens a dialog form
    that provides parameters to the rowsource of the form.
    >
    Thanks!
    >
    Steve
    >

    Comment

    Working...