Results 1 to 4 of 4
  1. #1
    Kelly_D is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Location
    Lincolnshire
    Posts
    2

    Subform - autofill data from main form

    Hi

    I have a database in access 2010 which includes a data form. This data form holds personal data about individuals such as name, address etc. A button leads from here to a subform where session detail can be entered. Both data and sessions are held on different tables but are linked by the persons name.



    How can I get it to populate the Persons Name at the top of the subform when going from the main form? It works with existing people that I have already set up but when I do a new individual, because their name is not in the session table it will not bring their details through.

    I hope this makes sense?

    Any advice appreciated.

  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
    The name shows on the main form, right? Why do you need to repeat it on the subform?
    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
    Kelly_D is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Location
    Lincolnshire
    Posts
    2
    Ahh think I've got confused.

    I thought i'd got a subform opening in new window but looks as though I'd done it as a new form. The question then is: If I add it as a subform, how can I change my subform to open in a new window and not display on the main form? Or how to change the existing form which opens in a new window to be a subform?

    The forms are quite involved so I need them separate.

    I have no idea how to use VBA so simple answers work best please?!!

  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
    Not understanding the issue. If you want a different subform then delete the current one and create a new one or change the SourceObject property of the existing subform container control.
    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. filter main form base on subform data
    By ss3373 in forum Access
    Replies: 7
    Last Post: 06-24-2011, 09:21 PM
  2. copy data from a subform to the main form
    By declanfogarty in forum Programming
    Replies: 1
    Last Post: 06-23-2011, 05:31 AM
  3. Replies: 1
    Last Post: 06-14-2010, 02:31 AM
  4. Replies: 4
    Last Post: 05-17-2010, 05:32 PM
  5. Replies: 2
    Last Post: 03-31-2010, 01:56 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