Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    relating subforms (Access 2003 winxp sp2)

    Due to changes forced by management, I now need to do the following.

    frmCustomerHistory has a continuous subform(A) showing all jobs by customer.

    As I cannot put a subform in a continuous form, I need a new subform( that is filtered by the current record in subform(A). The related field is [JobNum]

    Steps I think I need:
    When subform(A) first opens, ie frmCustomerHistory is opened

    subform(.linkedmasterfield = me.currentrecord.jobnum
    subform(.requery

    When I click on a different record in subform(A)

    in the detail onclick event
    subform(.linkedmasterfield = me.currentrecord.jobnum
    subform(.requery

    These are my thought on how it should happen. I would appreciate someone looking at the idea and drafting the correct syntax I would need to accomplish this.
    And/or pointing out why I can't do this and what I should do instead.
    "Heading for the deep end"

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

    Re: relating subforms (Access 2003 winxp sp2)

    You can put subform B in the form footer (or header) of subform A.
    Access will protest and reset the Default View of subform A to Single Form, but you can set it to Continuous Forms again and it'll work!
    No code is needed, the Link Master Fields and Link Child Fields properties take care of everything.

    The screenshot below shows a very crude example.
    Attached Images Attached Images
    • File Type: png x.png (13.1 KB, 0 views)

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Re: relating subforms (Access 2003 winxp sp2)

    Thanks Hans!

    Just what I needed, most appreciated
    "Heading for the deep end"

Posting Permissions

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