Hi Everybody,
hope I am in the right forum.
I have a problem, setting the columnwidths in an Access Form via VBA (using Access 2010 / Windows 7): In this form I have a ListBox, consisting fo 4 columns (widths in twips: 0; 340; 1985 and 1220 = 6.25 cm, the width of the ListBox itself beeing set to 6.3 cm). This works so far and no horizontal bar on the bottom of the ListBox is shown. For certain reasons, sometimes I want to change the measurements of 1. the Form and 2. the ListBox. With the Form it works fine, basing on its new size I want to change the ListBox and its columnwidths to then 0; 340; 5149 and 1220 (sums to 6709 twips). These new values are put into a String-Variable called allgKZalph1. With the command ListeAb.ColumnWidths = allgKZalph1 this value is transferred via VBA. The width of the Listbox itself is changed by the command ListeAb.Width = Me.WindowWidth - 450 which amounts to a value of 7215 twips, i.e. wider than the summary of its columns. These changes are programwise accepted. However now a horizontal bar at the bottom of the ListBox is shown (which I do not want to see at all)
If I change the single values of columnwidths - just for sample - to smaller values, it stays the same. The columnwidths change, but the horizontal bar ist still shown. What do I do wrong ? Or do I have to change another value too ? If so, which one did I miss.
Can anyone help me ? Thanks in advance !
Ulrich Schrader