Not sure about estimating the width (although there might be something at
Stephen Leban's site
http://www.lebans.com ), but take a look at what Randy
Birch has at
http://vbnet.mvps.org/code/comctl/lvcolumnautosize.htm : it's
how to automatically resize listview columns through APIs.
Obligatory warning: Randy's site is aimed at VB programmers, not Access
programmers. Since there are significant differences between the controls
available on VB forms vs. those available on Access forms, some of his
examples do not port directly into Access. This particular example is one of
those: it uses a control array (the 3 option buttons at the bottom of the
form), which Access does not support.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"(Pete Cresswell)" <x@y.z> wrote in message
news:ah********************************@4ax.com...
I'm using one of these things as a dynamically-populated picklist.
If nothing else, I'll just save .RecordCount after populating it and then
Docmd.MoveSize with varying Height/Width value pairs
(Small-Medium-Large-Humongous...) depending on the number of records
loaded.
Is there a more elegant method? i.e. something where the ListView knows
something about what it's square pixels would have to be in order to show
all contents?
--
PeteCresswell