Results 1 to 5 of 5
  1. #1
    hargro is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    4

    Scrollbar in subform leaves trace when a requery returns one record or less

    Hello.



    After too many attempts, I have to throw in the towel

    Setup:
    I have a form with two subforms (1 & 2), one of which has its own subform (2.1)

    Procedure:
    1. An event on subform 1 calls a function on the parent form with a parameter.
    2. This function calls another function on subform 2 and forwards the parameter.
    3. The parameter is used as a filter for subform 2.
    4. The RecordSource for sub-subform 2.1 is updated by the filter for subform 2.


    Problem:
    • When the query returns more than 13 records, a scrollbar appears - so far so good
    • When a query returns >13 records and then a new query returns 2-13 records, the scrollbar disappears - great
    • When a query returns >13 records and then a new query returns one record or less, the scrollbar disappears but leaves a grey field which persists until a query which returns 2 or more records is made - what?


    Additionally: If a query returns more than 13 records, then 2-13, then 0-1, the form works as intended. The problem only arise when going directly from more than 13 records to 0 or 1.

    Please see attached pictures.

    My spidey-sense tells me that the problem arise from the fact that I use a continuous form for the sub-subform because I was not able to achieve the intended effect by other means. Thank you in advance for an insight into possible causes of the problem and potential solutions.

    Best regards,
    hargro
    Attached Thumbnails Attached Thumbnails one.png   many.png  

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Try a Form.Repaint or Form.Refresh
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    hargro is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    4
    Quote Originally Posted by ridders52 View Post
    Try a Form.Repaint or Form.Refresh
    Have already tried to call these from both the sub-subform and the subform, but to no avail.

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    In the image, I see what could be two sub forms (no names, so....) but nary a sub sub form.

    Must you have two sub forms? Instead, could you use two list boxes? Sounds kinda like cascading list boxes (just like cascading combo boxes).

    Any chance of see ing the dB? Or can you create a small dB illustrating the problem?

  5. #5
    hargro is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    4
    I replaced the sub-sub form with a list box. It gives me a little less freedom, but that seems to be the easiest solution to my problem. Thank you

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

Similar Threads

  1. Replies: 8
    Last Post: 10-25-2017, 01:59 PM
  2. Replies: 4
    Last Post: 06-18-2015, 09:37 PM
  3. Replies: 2
    Last Post: 03-14-2014, 05:42 PM
  4. Vertical scrollbar issues with a subform
    By vange2013 in forum Forms
    Replies: 1
    Last Post: 11-27-2013, 09:13 PM
  5. Replies: 2
    Last Post: 01-11-2013, 06:51 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