column width in continuous form

F

Fev

Hi
I have a continous sub form (based on the advice on not using a
datasheet in this forum). I would like to show and hide columns based
on check boxes in the main form, however when a column is hidden based
on the check box, I would prefer not to have a blank space. Is it
possible to change the column width as well, so that if columns 1 and
3 are hidden, columns 2 and 4 will appear next to each other. I have
tried this code, but am not getting the result I would like:
Private Sub chkPta_Click()
If chkPta = -1 Then
Me!frmLSMBreakdown.Form!txtPta.Visible = True
Me!frmLSMBreakdown.Form!lblPta.Visible = True
Me!frmLSMBreakdown.Form!txtPta.ColumnWidth = 1.5

Else
Me!frmLSMBreakdown.Form!txtPta.Visible = False
Me!frmLSMBreakdown.Form!lblPta.Visible = False
Me!frmLSMBreakdown.Form!txtPta.ColumnWidth = 0
End If
End Sub
Thanks
Heather
 

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