Hello world:
I have a Parent form with a combobox, where the user selects a Contract or
Estimate number.
Then, on a subform, I have a listbox that gets filled with the details of
the selected Contract.
The subform listbox shows 21 rows.
That has been fine, but now we are starting to get some Contracts or
Estimates with more than 21 items.
When there are more than 21 items, no scrollbar shows up on the right side
of the listbox.
Users can't get to item 22 and up.
That's a problem.
I searched a bit, and found a Stephen LeBans suggestion from 1992/1993.
His suggestion is to force Access to recount the rows in the listbox.
In the Form_Load event of the form, he suggests putting:
Dim lngCount As Long
lngCount = Forms!frmParent!frmChild.Form.lstListBox.ListCount
Now, since the listbox is empty when the form opens, that is not what I did.
I put the code in the After_Update event of the listbox, figuring that
should work.
It doesn't work.
(I also tried putting it in the Form_Load, but no joy).
I added this message box:
MsgBox "RowCount is " & lngCount
which correctly shows "Row Count is 25".
No scrollbar ever appears.
What am I doing wrong?
Alan