Solved

Combo Box - VBA to modify ListWidth

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ms/access hyperlink/ftp 7 39
Update fields from multiple tables via same form 2 25
Prevent use of Microsoft Office application 9 54
format date field on certain entries 8 32
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server functions 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 Microsoft Ac…
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now