Results 1 to 2 of 2
  1. #1
    Gary Childress is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    34

    Refreshing a subform listbox when clicking on the main form listbox

    I currently have a listbox called "listbox45". Listbox45 shows all the records on my form called "main events form". Main events form has a subform within it called "event days table form". Event days table form has a listbox called listbox15. Listbox15 shows all the records on event days table form. I've attached a pic below of the overall form for better reference.
    Click image for larger version. 

Name:	MS Access Form.gif 
Views:	7 
Size:	47.7 KB 
ID:	19541


    So now when I click on an item in Listbox45 it brings up another event. However, event days table form still shows the days from the previous record. What I would like is for listbox15 to update itself when I click on an item in listbox45. I tried the following code line:

    me.event_days_table_form.listbox15.requery

    Unfortunately I get an error message saying "item not found" or something along those lines. When I try to use autofill in the code window it won't show me listbox15. Is there some way to get listbox15 to refresh when I click on listbox45?

    Many thanks for any assistance.

  2. #2
    Gary Childress is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    34
    In the famous words of Gilda Radner, "never mind". I was googling and found the answer I was looking for.

    FYI I used the following code on "click" event:

    Code:
    Private Sub Listbox45_Click()
    Me.[Form]![Event Days Table Form]!
    [Listbox15].Requery
    End Sub

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

Similar Threads

  1. Replies: 4
    Last Post: 09-02-2014, 03:53 PM
  2. Refreshing a listbox
    By PatrickCairns in forum Programming
    Replies: 9
    Last Post: 12-07-2012, 05:26 PM
  3. Replies: 1
    Last Post: 09-10-2012, 11:21 PM
  4. Replies: 2
    Last Post: 03-31-2012, 01:28 AM
  5. after DAO update, listbox.requery not refreshing
    By EuniceH in forum Programming
    Replies: 2
    Last Post: 10-21-2011, 04:16 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