Results 1 to 4 of 4
  1. #1
    Leonidsg is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    68

    Display info from parent form in child form

    Hello,



    I think this is relatively simple. What I am trying to do is in my Form (source is a child table) when I type in medical record number two combo boxes which would be linked to parent table display the patients first and last name. I figure I need two combo boxes, one linked to the first name field of the parent table and one linked to the last name field of the parent table. Then I would also need some Afterupdate command for the Medical Record Number text box whose source is the child table. That being said how do I actually write to code and what is the best way to link the two combo boxes to the parent table.

    Thank you,
    Lenny

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Why would you use comboboxes instead of textboxes for patient name parts? Why do the names need to display in the subform if they are viewable just above on the main form? Aren't the forms synchronized by PatientID?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Leonidsg is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    68
    This is a different form then you helped me with. You are correct I should use textboxes. The only reason I wanted to do this is so I didn't need to structure a Form, Subform, Subsubform. I would for some forms prefer that the main form be the child form and just pull in the name so when the patientID is put in we can have a confirmation that it is the same named patient.

    Thank you,
    Lenny

    Quote Originally Posted by June7 View Post
    Why would you use comboboxes instead of textboxes for patient name parts? Why do the names need to display in the subform if they are viewable just above on the main form? Aren't the forms synchronized by PatientID?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Options:

    1. include the employees table in the form RecordSource query, join type "Include all records from {the primary data} and only those from Employees that match", bind textboxes to the name fields, set properties Locked Yes, TabStop No

    2. textboxes reference columns of combobox that has the name fields

    3. DLookup expressions in textbox
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. display/add new info on a form
    By dgamma3 in forum Access
    Replies: 1
    Last Post: 01-22-2012, 02:54 PM
  2. Passing value from parent to child form
    By Pragmatic in forum Forms
    Replies: 1
    Last Post: 12-02-2011, 07:23 PM
  3. Replies: 2
    Last Post: 09-16-2011, 06:11 PM
  4. Problem using Parent/Child Form/Subform
    By EvanRosenlieb in forum Forms
    Replies: 4
    Last Post: 06-27-2011, 05:25 PM
  5. Calculation using Child and Parent
    By SamanthaSamuels in forum Reports
    Replies: 3
    Last Post: 08-17-2010, 11:07 AM

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