Changing column bound, width, and column count

  • Thread starter ryan.fitzpatrick3
  • 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?
 
D

Douglas J. Steele

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top