Changing column bound, width, and column count

  • Thread starter Thread starter ryan.fitzpatrick3
  • Start date Start date
R

ryan.fitzpatrick3

I have this code.

Private Sub cboxBranch_AfterUpdate()
Dim strSQL As String
If Nz(Me!cboxBranch, 0) = 0 Then
' If the combo is Null, use the whole table as the RecordSource.
Me!cboxVendor.RowSource = "tblAdageVendors"
Else

Me!cboxVendor.RowSource = "qryvendorbranch"
End If
End Sub


I have one question though. how do I change bound column count, column
bound and column width? Between the two seperate rowsources, one has
column bound 1, width 1, column count 1, and the other needs to show
column bound 2, width 0;1 and column count 2. how can i program this
into the vba code?
 
Me!choxVendor.ColumnCount = 2
Me!cboxVendor.BoundColumn = 2
Me!cboxVendor.ColumnsWidths = "0;1"""

Actually, I'm not positive about the third one. You may need to specify the
widths in twips (there are 1440 twips to the inch):

Me!cboxVendor.ColumnsWidths = "0;1440"
 
Back
Top