Re: List Box Column With

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Wed, 18 Jan 2006 08:40:17 -0800, Ross wrote:

> I have a list box with 10 items / columns. I want to hide and unhide item /
> column 3 based on certain conditions.
>
> Here is what I am trying to do but I don't know the syntax:
>
> Me.lstContacts.ColumnCount = 10
>
> lstContacts.ColumnWidth =
> 0.35";0.95";0";0.45";0.85";0.85";0.95";1.05";1.65";1.65"
>
> lstContacts.ColumnWidth =
> 0.35";0.95";1.05";0.45";0.85";0.85";0.95";1.05";1.65";1.65"
>
> How cant I toggle the width of item 3 between 0 and 1.05?
>
> Thank You
>
> Ross

Access measurements are in Twips, 1440 per inch.
Convert all of your measurements to twips by multiplying the inch
value by 1440 (i.e. 0.35 * 1440 = 504)
Also, it's the List box's ColumnWidths property, not ColumnWidth that
you need to change.

Code the AfterUpdate of some control:

If Me![ControlName] = SomeCriteria then
lstContacts.ColumnWidths = "504;1368;0;648;1224; ... etc.... ;2376"
Else
lstContacts.ColumnWidths = "504;1368;1512;648;1224 ... etc ...;2376"
End If

Note that the quotes are only used around the entire string, not
within the string.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.



Relevant Pages

  • Re: You guys who say the wood tyoe makes no difference on electrics
    ... That's not why you screw it down tight. ... You gotta keep that string going and prevent the ... returning the sound to u, ... Take that same room you were talking about and drill a 1 inch diameter hole about an inch deep on a 2 inch by 2 inch grid all over all four walls and the cieling and you will have dampened the sound nearly as effectively as if you put up some curtains or homosote panels. ...
    (alt.guitar)
  • Re: Exact Width and Heigh Measurements
    ... Internally, Access stores these numbers as twips, where 1440 twips = one inch. ... Centimeters (and even thousands of an inch) are not exact multiples of 1/1440 inch, so the number you type is typically displayed slightly differently after it is converted to twips. ... I'm creating a label report and the labels are 85mm x 85mm. ...
    (microsoft.public.access.reports)
  • Re: Position Msgbox
    ... inch, or approximately one seventy-secondth of an inch") ... > meant to say multiply inches by 1440 to get the measurement in twips. ... >>> the MoveSize property. ...
    (microsoft.public.access.formscoding)
  • Re: Dragging Images in Visual Basic 6
    ... That explanation of course still holds good, but perhaps I should also have mentioned the fact that, on a computer, one inch is not necessary the same actual physical size as one inch in the real world (as would be measured by a standard measuring rule). ... All standard measurement units when displayed on your computer screen should be looked on as "logical" units (inches, twips, centimeters, etc). ... These "logical units" hold exactly the same relationship to each other as they do in the real world, for example one logical inch contains 2.54 logical centimeters or 1440 logical twips, just as in the real world one real inch contains 2.54 real centimeters or 1440 real twips. ...
    (microsoft.public.vb.general.discussion)
  • Re: David Russell tip question
    ... "Don't think of bringing the finger up any further above the string ... than half an inch to an inch, or pressing down on the string any ... Read my site on slurs and do as I say. ... Free download of technical exercises worth a lifetime of practice: ...
    (rec.music.classical.guitar)