Results 1 to 5 of 5
  1. #1
    Paul1 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    50

    Question How to automatically requery subreport listbox from another form

    Please find attached my example db.



    I would appreciate some help with requerying my subreport listbox from an action in another form.

    For example if you click on the top row list box REP197 then the “Scheduled Details” listbox on the subform is populated. If you then double click one of those rows, the “Edit Scheduled Details” pop- up form is displayed where you can edit the details in this subreport.

    Now for example if I select a different frequency, requestor or format and then save the form, any changes are not shown until I click the row again in the “Scheduled Reports” listbox on the top.

    I have tried so far unsuccessfully to automate this and would appreciate if someone could suggest how this listbox row could be automatically clicked on when saving and closing the popup form.

    Many thanks for all your help.
    Attached Files Attached Files

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    For form frmEditScheduledDetails:
    Code:
    Option Compare Database
    Option Explicit
    Private Sub cmdSaveClose_Click()
       DoCmd.Close acForm, Me.Name
       Form_frmScheduledReports.Refresh
    End Sub
    Last edited by davegri; 01-07-2019 at 10:27 AM. Reason: format

  3. #3
    Paul1 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    50
    Yes this works perfectly.


    I did try exactly the same thing with .requery
    Why doesn't .requery also work in this scenario?


    Many thanks.

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Why doesn't .requery also work in this scenario?
    I don't know and from Googling, the explanations there don't seem to fit your scenario.
    I code for empirical results desired, (read trial-and-error ) not so much by predicting esoteric Access behavior.

  5. #5
    Paul1 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    50
    OK fair enough. Thanks again for all your help.

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

Similar Threads

  1. Requery a listbox
    By UT227 in forum Forms
    Replies: 9
    Last Post: 07-14-2018, 02:50 AM
  2. Trying to requery a listbox
    By UT227 in forum Programming
    Replies: 23
    Last Post: 01-22-2018, 08:17 PM
  3. Requery Listbox with the following code
    By UTLee in forum Programming
    Replies: 9
    Last Post: 09-05-2014, 08:37 AM
  4. Requery ListBox on Mainform from Subform
    By Ruegen in forum Forms
    Replies: 11
    Last Post: 10-29-2013, 09:27 PM
  5. Requery SubReport with VBA
    By tylerg11 in forum Access
    Replies: 1
    Last Post: 02-21-2013, 12:24 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