Results 1 to 3 of 3
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    isloaded not refreshing every time


    I have a global function that refreshes another form every time it is closed. There are two forms that open from the same form - however one doesn't refresh the primary form.

    The primary form has a listbox that when it's count list <= 0 a button appears
    else
    the button dissapears and the listbox lists what it has

    however this is not working. The records have been updated however the listbox is not updating and the button isn't dissapearing

    I have
    Code:
    If CurrentProject.AllForms("frmSchools").IsLoaded Then
    Forms!frmSchools.Form.Refresh
    Forms!frmSchools!listCluster.Requery
                If Forms!frmSchools!listCluster.ListCount <= 0 Then
                            Forms!frmSchools!txtClusterFind.Visible = True
                Else
                
                            Forms!frmSchools!txtClusterFind.Visible = False
                End If
    
    end if
    Any idea why sometimes it works and other times it doesn't?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    What do you mean "doesn't work" - error message, nothing happens?

    What event is this code in?

    Have you step debugged?
    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
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    No haven't step debugged.

    The function is in a module.

    the event is on docmd.close

    (I also put it on onevent close form but that didn't make a difference)

    Nevermind - figured it out (was removing a tempVars by accident)

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

Similar Threads

  1. Refreshing a subform
    By RobRoy in forum Forms
    Replies: 8
    Last Post: 07-22-2013, 04:19 PM
  2. Refreshing a combo box
    By tcheck in forum Access
    Replies: 3
    Last Post: 02-21-2012, 12:29 PM
  3. refreshing tables?
    By danbo in forum Access
    Replies: 1
    Last Post: 12-23-2011, 03:05 AM
  4. SubForm not refreshing
    By hawkins in forum Access
    Replies: 2
    Last Post: 08-16-2011, 04:30 PM
  5. Refreshing a subform?
    By Shag84 in forum Forms
    Replies: 4
    Last Post: 08-07-2011, 10:07 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