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 / Forms Programming / February 2007

Tip: Looking for answers? Try searching our database.

Setting combo column width

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg Snidow - 08 Feb 2007 10:40 GMT
Greetings all.  In Access 2003 I have a form where I set the rowsource and
column count based on the value of a text box.  What I need to do now is to
also be able to adjust the column widths like this

Private Sub label_click
me.mycombo.columnwidths = 1,3
Exit sub

I can not figure out the correct syntax.  I have tried "1","3"  "1,3" "1;3"
"1";"3"
but none of these work.  Any ideas?
Stephen Lebans - 08 Feb 2007 12:09 GMT
At runtime, this property is expressed in Twips. There are 1440 Twips per
inch.

Signature

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> Greetings all.  In Access 2003 I have a form where I set the rowsource and
> column count based on the value of a text box.  What I need to do now is
[quoted text clipped - 9 lines]
> "1";"3"
> but none of these work.  Any ideas?
Greg Snidow - 08 Feb 2007 14:57 GMT
Stephen, thanks for the quick reply.  Could you maybe elaborate a little bit
on how I could manupulate the column widths with adjusting the Twips?  If I
am able to set the column widths in the properties dialog box of the combo in
question with 1",3" format why can I not do this on the click event of
another control?  When you say at runtime I am not sure what you mean.  I
should have included that I am still trying to learn Access programming.  
Thank you.

> At runtime, this property is expressed in Twips. There are 1440 Twips per
> inch.
[quoted text clipped - 12 lines]
> > "1";"3"
> > but none of these work.  Any ideas?
Douglas J. Steele - 08 Feb 2007 15:35 GMT
Through code, you use twips, not inches or centimeters.

Try:

me.mycombo.columnwidths = "1440, 4320"

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Stephen, thanks for the quick reply.  Could you maybe elaborate a little
> bit
[quoted text clipped - 25 lines]
>> > "1";"3"
>> > but none of these work.  Any ideas?
Greg Snidow - 09 Feb 2007 13:18 GMT
Thanks once again Stephan and Doug.  That worked like a charm.

> Through code, you use twips, not inches or centimeters.
>
[quoted text clipped - 31 lines]
> >> > "1";"3"
> >> > but none of these work.  Any ideas?
 
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.