Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 39
  1. #16
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    If the subform is bound to the table (its record source), then it should update automatically.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  2. #17
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    pbaldy, Yes the record source is bound to the table.

  3. #18
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Then it should update when you change records on the subform, change focus from the subform to the main form, or close the form. Does it not? Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #19
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    I have a button that saves that record and a button to start a new record.
    I tried those and it did not update.

    Here is the db:
    ProcessSheets 5-1-17.zip

  5. #20
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    That's a PDF.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #21
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    OH my.
    I may see the problem.
    I have the save button and new button on the main form and not the sub form.
    Will that make a difference?

  7. #22
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    sorry, picked the wrong file

  8. #23
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Yes, the buttons are on the main form so they aren't saving the subform record, though it should save anyway when focus leaves the subform to the button. The new button would affect the main form, not the subform.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #24
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    I tried a save button on the sub form but it did not save the numbers to the table.
    I must have something out of wack.

  10. #25
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Save what numbers? In the version you posted, new records in the subform are saving to the table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #26
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    The Operation_Numbers are not being saved.
    When I completed the form for the auto fill it did not save those operation numbers to the table.

  12. #27
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Because that textbox isn't bound to a field in the table, it just has an expression to display:

    =[Operation_ID].[Column](1)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #28
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    If you need to save both values, you may want the second method here:

    BaldyWeb - Autofill
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #29
    FlabbyRoach is offline Advanced Beginner
    Windows 8 Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    48
    So this is the code I put in the AfterUpdate event

    Option Compare Database
    Private Sub Operation_Number_AfterUpdate()
    Me.Operation_Number = Me.Operation_ID.Column(1)
    End Sub

    Private Sub Operation_Number_BeforeUpdate(Cancel As Integer)
    End Sub

    But that kind of defeats the purpose of the auto fill, no?
    I will have to input the Operation_Numbers by hand and then it will save them.

  15. #30
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    No, the code would go behind the ID combo, so when they make a selection there it populates the other.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. auto populate textbox
    By willfrank in forum Access
    Replies: 1
    Last Post: 04-13-2016, 09:53 AM
  2. Auto Populate fields with ComboBox
    By warmanlord in forum Access
    Replies: 3
    Last Post: 10-02-2015, 08:59 AM
  3. Auto Populate TextBox
    By Shido151 in forum Access
    Replies: 3
    Last Post: 04-23-2013, 10:41 AM
  4. Replies: 1
    Last Post: 02-04-2013, 09:48 AM
  5. Replies: 1
    Last Post: 01-16-2013, 03:32 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