Home > Net >  Combobox List Width not sizing the dropdown list
Combobox List Width not sizing the dropdown list

Time:02-23

So I am working in access trying to get different queries to pull specific information when a select case is met.

This is what I have so far

Select Case Me.vPipeFlowDirection.Value
    
    Case "All"
        Me.vPipe_Name.RowSourceType = "Table/Query"
        Me.vPipe_Name.RowSource = "Select * From qryList_V_Profile_PI_AllPipeNames"
        Me.vPipe_Name.ListWidth = 3.5
        Me.vPipe_Name.ColumnCount = 2
        Me.vPipe_Name.ColumnWidths = "3in, 0.5in"
        
    Case Else
        Me.vPipe_Name.RowSourceType = "Value List"
        Me.vPipe_Name.RowSource = "None"
End Select

The issue is that the the List Width is working but its putting a horizontal scroll bar instead of making the drop down box bigger

CodePudding user response:

Hy, The code bellow works. I assume it is a size in pixels ? My computer settings are in CM so this might work different with you...

  Select Case Me.cboListWidth.Value

    Case "Big Example"
        Me.cboListWidth.RowSourceType = "Table/Query"
        Me.cboListWidth.RowSource = "Select * from tzzConfig"
        Me.cboListWidth.ListWidth = "8000"
        Me.cboListWidth.ColumnCount = 2
        Me.cboListWidth.ColumnWidths = "2000,4000"
        
    Case Else
        Me.cboListWidth.RowSourceType = "Value List"
        Me.cboListWidth.ListWidth = "2000"
        Me.cboListWidth.RowSource = "None"
    End Select
        

enter image description here

enter image description here

CodePudding user response:

Try to "just leave the rest" of the 3.5" to the second column:

Me!vPipe_Name.ColumnWidths = "3in"
  • Related