Solved

Combo Box - VBA to modify ListWidth

Posted on 2004-04-20
2
916 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 50 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

726 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