Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Provided Answers: 3

    Unanswered: Subforms using SourceObject property

    I have a list box on a form. When I pick an item from the list box, the SourceObject Property of a subform changes to a different form. That works great. Trouble is, I don't know how to make that subform open showing specific records. When I try to specify that form in code, Access can't find it. It's like it's not really open when viewed through a subform. Does anyone have any suggestions? If I did not explain it well, let me know I'll try again. Thanks in advance.

  2. #2
    Join Date
    Feb 2002
    Subforms are controls on the parent form, so they require a different approach when coding.

    To address a control on a subform for example:

    Forms("Name of main form")("Name of subform")("ControlName")

    To requery a subform:

    Forms("Name of main form")("Name of subform").Requery

    Name of subform is the name of the subform viewed from the property sheet in the main form. Click on the subform so the subform is selected and bring up it's properties, you will probably find this is a different name to your form name altogether.


Posting Permissions

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