Results 1 to 11 of 11
  1. #1
    Karyn is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    13

    Empty subform after find

    I have a form with a linked subform. It works until I use the GUI find tool (the binoculars). After doing this the subform is sometimes (but not always) empty. What's happening?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    It is not finding a match to your criteria.

  3. #3
    Karyn is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    13
    Yes it is. The main form displays an agreement, the subform displays accounts that are associated with that agreement. If I browse to an agreement then the subform is correctly populated. If I move to the same agreement using the binocular tool the subform is empty.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Are you searching the subform or are you searching the main form?

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by ItsMe View Post
    Are you searching the subform or are you searching the main form?
    This may be the crux of the matter! You sound as if you mean to be searching the Main Form (Agreements) but if the focus is currently in a Control on the Subform, the search is, in fact, being run against the Subform...and is coming up empty. To search the Main Form, a Record in the Main Form has to have the focus. This might explain the 'sometimes it works, sometimes it doesn't;' depends on where the focus is when you click on the binoculars!

    Linq ;0)>

  6. #6
    Karyn is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    13
    Quote Originally Posted by Missinglinq View Post
    This may be the crux of the matter! You sound as if you mean to be searching the Main Form (Agreements) but if the focus is currently in a Control on the Subform, the search is, in fact, being run against the Subform...and is coming up empty. To search the Main Form, a Record in the Main Form has to have the focus. This might explain the 'sometimes it works, sometimes it doesn't;' depends on where the focus is when you click on the binoculars!

    Linq ;0)>
    No. I am clicking in a field on the parent form and using the binoculars (or any filtering tool). I think the problem arises because the field being filtered on is the one wihich links the parent and child forms.

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    That should be the Primary Key of the Table the Main Form is based on...which makes even less sense!

    Since this occurs when you're changing Records, do you have any code in the Form_Current event?

    The only other thing I can think of, especially since it's an intermittent problem, would be that you're dealing with a Form that's become corrupted.

    Linq ;0)>

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Yup, either it is post #2 or something is corrupt, Form, Control, File.

  9. #9
    Karyn is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    13
    Quote Originally Posted by Missinglinq View Post
    That should be the Primary Key of the Table the Main Form is based on...which makes even less sense!

    Since this occurs when you're changing Records, do you have any code in the Form_Current event?

    The only other thing I can think of, especially since it's an intermittent problem, would be that you're dealing with a Form that's become corrupted.

    Linq ;0)>
    I have extensive code in the form_current event. Suspecting corruption I've compacted/repaired several times with no useful effect. I'll try creating a new form and see if I can replicate the problem.

  10. #10
    Karyn is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    13

    Talking Solved

    Found the problem. There was a permananent filter set on the subform (no idea how it got there). I deleted that and the problem was solved.

  11. #11
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by Karyn View Post

    ...There was a permananent filter set on the subform (no idea how it got there)...
    Sounds like them rascally Access Gnomes have been playing games, again! They get bored, from time to time, and do things just to be doing something!

    Glad you got it working!

    Linq ;0)>

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

Similar Threads

  1. Replies: 1
    Last Post: 08-29-2013, 11:38 AM
  2. Replies: 3
    Last Post: 08-22-2013, 12:14 PM
  3. Replies: 1
    Last Post: 09-20-2012, 03:15 PM
  4. Replies: 1
    Last Post: 04-18-2012, 11:06 AM
  5. Subform empty when main form loaded
    By martyjward in forum Forms
    Replies: 1
    Last Post: 08-15-2011, 04:37 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