Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

List Box Column With

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ross - 18 Jan 2006 16:40 GMT
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
fredg - 18 Jan 2006 17:18 GMT
> I have a list box with 10 items / columns.  I want to hide and unhide item /
> column 3 based on certain conditions.
[quoted text clipped - 14 lines]
>
> 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.

Signature

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

Ross - 18 Jan 2006 18:04 GMT
Fred,

I don't know how TWIPS slipped my mind!?

Thank you very much!

> > I have a list box with 10 items / columns.  I want to hide and unhide item /
> > column 3 based on certain conditions.
[quoted text clipped - 31 lines]
> Note that the quotes are only used around the entire string, not
> within the string.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.