Results 1 to 11 of 11
  1. #1
    Flashqueen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    5

    Main Form Sub Form Data does not populate to query

    Thank you - this forum is very helpful.



    Issue 1: A main form that shows current data from another table. A sub form to enter data. I want the sub form data to populate the recordsource query of the main data. The form is split so that I can see the records. The data only populates when I click the next record.

    Issue 2: a: The data may populate to another record -
    b: The data may not populate at all -

    Issue 3: I cannot save the record at all. On the main form it is grayed out. On the sub form the option to save is there, but it will not save to the record showing on the form.

    Please help - blue is issue 2 and red is issue 3. The diary table that the form is based on will not have data in it until it is put in by the user. This is because they may not need to add a diary.

    Am I making things too complicated?

    Thank you.

    Click image for larger version. 

Name:	Access image capture.PNG 
Views:	16 
Size:	94.5 KB 
ID:	15352

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Is this a form/subform or a Split form?

    "I want the sub form data to populate the recordsource query of the main data." does not make sense to me.

    Data is committed to table when form is closed, move to another record, or run code to save.
    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
    Flashqueen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    5
    Thank you for the prompt reply. It is a split form/subform. (The subform property is set to a single form.)

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018

    ...I want the sub form data to populate the recordsource query of the main data." does not make sense to me...
    Makes no sense to me, either, and you haven't explained it. Main Form should populate one Table, and the Subform should populate another, related Table.

    Linq ;0)>

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    A Split form is not a form/subform. A Split form is a special type of form. After looking at your image again, it does appear to be a Split form. Yes, edits in datasheet section will not be reflected in other section until move to another record. Edits in other section are reflected in the datasheet after exiting the control.

    After edit in datasheet section, Refresh the form. Unfortunately, this will set focus on the first record.

    That's the way Split form works. I've never used it.
    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.

  6. #6
    Flashqueen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    5
    True. Very true. Main form is already populated. (Think the light bulb may have came on.) Subform should populate and then have it all appear in the query. Will check.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Our confusion comes from your reference to form and subform. There is NO subform. The Split form shows the same data in two sections, but it's all the same source.
    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.

  8. #8
    Flashqueen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    5
    Click image for larger version. 

Name:	Access image capture.PNG 
Views:	10 
Size:	23.7 KB 
ID:	15354

    Yep, looks like no subform. There are two sources. Main form (2013...query) sub form (diary table). Need to come together (diary query).

    Click image for larger version. 

Name:	Access image capture.PNG 
Views:	10 
Size:	10.2 KB 
ID:	15355

    When the user clicks save they see the updated data below.

    Click image for larger version. 

Name:	Access image capture.PNG 
Views:	10 
Size:	46.3 KB 
ID:	15356

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Don't know your data relationships.

    If you have two tables in the form RecordSource, then what you really need is a form/subform, not a Split form. See post 4.

    Why would DiaryDate be in both tables?
    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.

  10. #10
    Flashqueen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    5
    One is a hearing date and the other a diary date for follow-up. At this time let's consider this close and I'll do only form/subform and see where it gets me. The thing is it was working earlier and I decided to do some cosmetic changes and now the problem. Will let you know if I've fixed, revamped, or gave up.

    Thanks everyone for your valuable input - have a great day.

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Your image shows arrow linking two DiaryDate controls, not the HearingDate field.

    Good Luck.
    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. Replies: 11
    Last Post: 01-10-2013, 06:23 PM
  2. Replies: 3
    Last Post: 09-20-2012, 11:23 AM
  3. Replies: 2
    Last Post: 09-08-2012, 08:25 PM
  4. Auto Populate Data from Main Form
    By billiejean in forum Forms
    Replies: 0
    Last Post: 08-05-2009, 08:08 AM
  5. Replies: 0
    Last Post: 06-23-2009, 03:01 PM

Tags for this Thread

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