[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Combo Box - VBA to modify ListWidth

Posted on 2004-04-20
2
Medium Priority
?
991 Views
Last Modified: 2008-02-01
I am trying to manipulate a combox of a form given if Assem is True/False. I finally got the ColumnWidths to work with inserting the Chr(35) charater ( " ), but the ListWidth doesn't want to cooperate with me. The list width won't change no matter what I am doing. It defaults to the width of the combox box and if I tried to insert the Chr(34) but I get an error message saying this property only accepts a number. Any ideas on how to alter the ListWidth Property?

    If Assem = True Then
        Forms![frmPrintJob]![RptCriteria].ColumnHeads = True
        Forms![frmPrintJob]![RptCriteria].ColumnCount = 2
        Forms![frmPrintJob]![RptCriteria].ColumnWidths = 0.7 & Chr(34) & ";" & 2.3 & Chr(34)
        Forms![frmPrintJob]![RptCriteria].ListWidth = 3 <---- Won't alter the List Width
    Else
        Forms![frmPrintJob]![RptCriteria].ColumnHeads = False
        Forms![frmPrintJob]![RptCriteria].ColumnCount = 1
        Forms![frmPrintJob]![RptCriteria].ColumnWidths = 1
        Forms![frmPrintJob]![RptCriteria].ListWidth = 1
    End If
0
Comment
Question by:snoble
2 Comments
 
LVL 18

Accepted Solution

by:
Data-Man earned 150 total points
ID: 10871290
Snoble,
  you can use this to adjust the column width property

Me.controlname.ColumnWidths = "0.75 in;1 in;0 in;0 in;0 in;0 in"

Me.controlname.ListWidth = "4536"  'This value is in twips.  1440 per inch

Hope this helps,
Mike
0
 
LVL 1

Author Comment

by:snoble
ID: 10871434
Data-Man,

      Thanks for the info. I am using the Chr(34) on the column widths and that seems to be working fine. I did discover the List Width was obviously not using inches by default by playing around. Thanks for the info.... issue is resolved. Thanks.

Stephen
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question