Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Oct 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use a form as multiple subforms? (2000/sp3)

    Me again, more with my part database...

    I have a simple form, that lists quantities and locations.

    I want to use this form as a subform several times on another form. The first instance I want to filter based on a location being "Inventory", a second instance I want filtered based on location being "Dispursed".

    Can this be done? Or do I need to make a copy of the quantity form and call them ..._1 and ..._2 so that the can be included simultaneously?

    thanks a million!
    ..dane

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Use a form as multiple subforms? (2000/sp3)

    You can use the same form several times as a subform on the same main form. Put two text boxes on the main form that contain the filter values. Add the name of the appropriate text box to the Link Child Fields property of each subform, and the name of the location field to the Link Master Fields property.

  3. #3
    2 Star Lounger
    Join Date
    Oct 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use a form as multiple subforms? (2000/sp3)

    Hans -- what you say makes sense, but I cannot seem to implement. I added two textboxes on the main form and put "Inventory" in one and "Dispursed" to the other, as you suggested, and made them hidden.

    I went to go link these boxes to the appropriate field in the master/child link list, but in the link window that pops up, only the fields from the source data (query) are avialable to choose from; trying to type anything else yeilds in the error "The text you entered isn't an item in the list. Select an item from the list, or enter text that matches one of the listed items."

    I must be missing something obvious?

    (Edit) This may be a moot point-- I've learned that for an easier user-interface, each sub-form needs to have a button to do a different task. The sub-form showing inventory needs to have a button beside each entry to "Dispurse this item", and similarly the sub-form for dispursements needs to have a button beside each entry to "Return this item to stock." I imagine that I need two forms if I have a button that does two different actions, right? (Note -- I have used one button in past databases that performed various functions depending on the state of various data, however with a single form being used twice simultaneously, I don't know that I can have two different 'states' anymore...)

    ..dane

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Use a form as multiple subforms? (2000/sp3)

    Although It should be possible to make the button do two different things, it will probably be easier to create two copies of the subform (in the database window)

  5. #5
    2 Star Lounger
    Join Date
    Oct 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use a form as multiple subforms? (2000/sp3)

    And easier to implement usually means easier to maintain. [img]/forums/images/smilies/smile.gif[/img] That's the route I'm taking at this point. Thanks for the help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •