How to size a continuous subform with a combobox (1 Viewer)

hkc94501

Member
Local time
Tomorrow, 07:38
Joined
Aug 6, 2021
Messages
37
I have a form (actually a lot of forms) with continuous subforms containing a combo box and a button. These forms support multiple selection and may grow without (practical) limit. My problem is that when the list of selected records grows larger than can be contained in the subform the subform scrolls but it does not scroll to the bottom so the combobox where I want to make the next selection is not completely visible. I have to manually scroll the subform to bring the new input combobox into view.

Is there some way to make the subform scroll to the bottom before the new input combo box is displayed?

I have attached two pictures to illustrate the problem. Obscured input line.png shows what I get and Unobscured input line shows what I want.

Many thanks.
Hank Cohen
 

Attachments

  • obscured input line.png
    obscured input line.png
    27.4 KB · Views: 71
  • unobscured input line.png
    unobscured input line.png
    20 KB · Views: 83

June7

AWF VIP
Local time
Today, 13:38
Joined
Mar 9, 2014
Messages
3,716
Resize the form so row will display fully. Forms don't shrink and grow dynamically because of screen display limits - that's why they have scroll bars.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:38
Joined
May 21, 2018
Messages
5,690
If you move to the new record then move back 1 that will scroll to the bottom forcing the last record to be visible like in the second example.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:38
Joined
May 21, 2018
Messages
5,690
Can you post a larger pic? A possibly nicer interface is to actually have two subforms. The first is either a single form view, or a continuous form view in the add new mode. This is where new records are added. Below that is the continuous form showing all records. This can have add new set to false but I do not think it matters. As you move from subform to subform, I think that will set dirty to false in either so you should be able to add new in both.
This view is nice. If not simply add a button at top of your subform to move to new record. It should scroll all the way to the bottom forcing the record to be visible.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 22:38
Joined
Sep 12, 2006
Messages
14,689
you can just click the newrecord icon in the navigation buttons. The one with the yellow start in your popups.
If you are working at the bottom of a continuous form, it's hard to avoid this.
 

isladogs

CID VIP
Local time
Today, 22:38
Joined
Jan 14, 2017
Messages
15,530
Perhaps you can use a modified version of the attached example:
That shrinks/grows both subform & the main form on a button click.
You could change the code to change the height to whatever works for you
 

Attachments

  • SubformShrink&Grow_v3.zip
    54.7 KB · Views: 85

hkc94501

Member
Local time
Tomorrow, 07:38
Joined
Aug 6, 2021
Messages
37
I found that pressing enter causes the focus to shift to the new record combobox which in turn causes the form to scroll to the bottom. Tabbing to the next combobox has the same effect. I think this is equivalent to clicking on the new record control. I was hoping to not have to do that extra click but I guess it is needed to finalize the record.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 22:38
Joined
Sep 12, 2006
Messages
14,689
You might get that effect if you tab order is illogical. Generally you want tabs to proceed in a sensible order. You can change the tab order, and remove tab stops from certain fields.

Often you don't want the tab to move to the next record, as that will save the current record. There is a "cycle" property that can turn this off if you prefer. I generally have cycle on current record to be honest.
 

Users who are viewing this thread

Top Bottom