Results 1 to 12 of 12
  1. #1
    RANCHLAW56 is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    13

    subform to subform conditional post

    I have a form with several tabbed subforms. Several of the subforms are for gathering peoples names and information (lastname, firstname etc.) the forms are named for the persons role (reporting party, complainant, victim, etc.)

    How can I post information entered into one subform if a check box is selected? (reporting party = complainant)

    I am trying to eliminate repetitive entries but have to duplicate information across tables.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you have a "people" table then it could contain *all* of the people, complaintant, reporting party, victim, etc. Then a ComboBox could be used to select these "people" and the NotInList Event could be used to describe a new "person". Then only PeopleID's would be included in the "case" table.

  3. #3
    RANCHLAW56 is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    13
    Have to use individual tables. I proposed the single file but the Boss overruled me and said they would be in individual tables.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Hmm...I guess it is time to ask the boss for the solution then.
    Two examples:
    http://allenbrowne.com/AppHuman.html
    http://allenbrowne.com/ser-06.html

  5. #5
    RANCHLAW56 is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    13
    Each person can have multiple roles in the incident and the Boss wants to be able to click on the role tab and see the person in that role.

    Reporting Party, Complainant, Victim, Witness, Suspect etc.

    So it is either find a way to post to the other subform or reenter the data.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Each tab can have its own SubForm with a different query into the *same* table.

  7. #7
    RANCHLAW56 is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    13
    Same table is NOT an option.

    I know this can be done but I cannot get the code right.

    This is the code I have currently:

    Private Sub ISCOMPLAINANT_DblClick(Cancel As Integer)
    On Error GoTo Err_ISCOMPLAINANT_DblClick


    Me.Parent.Complainant.Form.Race = Me.Race
    Me.Parent.Complainant.Form.POB = Me.POB
    Me.Parent.Complainant.Form.Occupation = Me.Occupation


    Exit_ISCOMPLAINANT_DblClick:
    Exit Sub
    Err_ISCOMPLAINANT_DblClick:
    MsgBox Err.Description
    Resume Exit_ISCOMPLAINANT_DblClick

    End Sub

    Returns the following error:

    Object doesn't support this property or method

    Button is located on the Reporting Party subform and trying to post to the
    Complainant subform.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    A SubFormControl does not always have the same name as the SubForm it displays. The syntax is Me.Parent.SubFormControlName.FORM.ControlOnSubFormName

  9. #9
    RANCHLAW56 is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    13
    I think I may have wandered too far into the woods and now I'm lost.

    I can send you a copy of the db if it will help us talk apples-apples.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'll PM you with my email addy. I have some time today.

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I've attached your db to an email. If it is too big for your ISP let me know and I'll use one of the file hosting sites instead.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Post #8 was the solution. I've marked the thread as Solved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Pass Subform filter to subform in report
    By camftm in forum Programming
    Replies: 16
    Last Post: 07-19-2011, 07:12 AM
  2. Replies: 15
    Last Post: 11-09-2010, 04:27 PM
  3. Data from one subform to anther subform
    By scotribs in forum Forms
    Replies: 3
    Last Post: 03-09-2010, 09:53 AM
  4. Replies: 1
    Last Post: 12-10-2005, 04:52 PM
  5. Subform in a Subform and relationships
    By St3ph3n in forum Database Design
    Replies: 3
    Last Post: 12-06-2005, 06:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums