Avatar of Keith McElroy
Keith McElroy

asked on 

Microsoft Access 2010 - set dynamic columnwidth based on data

I have a sub report in a report.  I want to change the column widths property based on blank vs populated in columns from right to left

This code does not seem to update the report, how can I make this work

Private Sub Detail_Paint()
If Trim(Me!cboVariety.Column(3)) <> "" Then
    Me!cboVariety.ColumnWidths = "0;0;0;1"
ElseIf Trim(Me!cboVariety.Column(2)) <> "" Then
    Me!cboVariety.ColumnWidths = "0;0;1;0"
Else
    Me!cboVariety.ColumnWidths = "0;1;0;0"
End If

 

 

End Sub
Microsoft Access

Avatar of undefined
Last Comment
PatHartman

8/22/2022 - Mon