Results 1 to 7 of 7
  1. #1
    IamKJVonly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2018
    Posts
    41

    What is the best way to update 1 of 6 tabular forms after the data has been changed in another form?

    I know I'm pushing my luck today with a
    nother request but here goes:



    I have a main menu form (which I will call form 1) from which I select 1 of 6 tabular forms.
    II takes me to a tabular form which (I will call form 2) where I
    select
    the record I want to change.
    Now I go to a form
    (which I will call form 3)
    where I can change any of the fields in the selected record and save the changes by closing form 3.
    This drops me back to the original selected 1 of 6 tabular form 2 which is now needs to be updated.

    This is my question: What's the best way to update form 2.
    What I do now (if I remember to do it).
    Is to close form 2 manually by clicking on the form's x.
    This
    drops me back to form 1 where I manually select form 2 again which then get updated.

    I hoping there is and easier way to do this by updating form 2 when I drop back to it without having to go back to form 1 or do anything manually.
    I've tried everything I know (which is NOT much) without direction and my almost non existent coding ability; I see nothing but problems ahead in this area.

    So I can truly say any and all help will be greatly appreciated.
    Dave.






  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You can refresh or requery form 2 from form 3's close event.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    forms!form2.requery

  4. #4
    IamKJVonly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2018
    Posts
    41
    It was a good idea but didn't work.
    It looks like you can only requry a field.

    "There is no field named 'forms!frm_F_DateLastRead.requery' in the current record.

    Is the Command I used: forms!frm_F_DateLastRead.requery

    Dave

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    It would go in the VBA editor. Sounds like you put it in a macro.

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    IamKJVonly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2018
    Posts
    41
    Your right I just haven't been thinking in terms VBA DoCmd but I'm getting there. LOL

    The following code works fine. Thanks for the help.
    Private Sub cmdReturn_Click()
    DoCmd.Close acForm, "frm_F_AddEditBookRecord"
    DoCmd.Requery frm_F_DateLastRead
    End Sub

    I guess the old saying you have to crawl before you can walk certain fits me to a "T".
    Thanks again I couldn't have done it without your help.
    Dave

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem Dave.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 02-27-2018, 11:39 PM
  2. Importing Data from website when noit in tabular form
    By faodavid in forum Import/Export Data
    Replies: 3
    Last Post: 08-05-2014, 08:50 AM
  3. Replies: 4
    Last Post: 05-14-2014, 10:03 PM
  4. Replies: 1
    Last Post: 03-15-2012, 02:21 PM
  5. Replies: 7
    Last Post: 03-22-2011, 10:36 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