PC Review


Reply
Thread Tools Rate Thread

column width in continuous form

 
 
Fev
Guest
Posts: n/a
 
      7th Sep 2011
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
 
Reply With Quote
 
 
 
 
New Member
Join Date: Sep 2011
Posts: 1
 
      7th Sep 2011
Heather:

Although I am not a fan of datasheets this may be most applicatle for you criteria.
I am using an approach based on a selection from a ComboBox on a Main Form:

If Me.cboColumns.Value = "ValueStream" Then
Me.frmItem_Detail_All.Form!txtVS_Centrifuge.ColumnHidden = False
Me.frmItem_Detail_All.Form!txtVS_LSA_CE.ColumnHidden = False
Me.frmItem_Detail_All.Form!txtVS_Plastics.ColumnHidden = False
Me.frmItem_Detail_All.Form!txtVS_Rotors.ColumnHidden = False
Else
Me.frmItem_Detail_All.Form!txtVS_Centrifuge.ColumnHidden = False
Me.frmItem_Detail_All.Form!txtVS_LSA_CE.ColumnHidden = False
Me.frmItem_Detail_All.Form!txtVS_Plastics.ColumnHidden = False
Me.frmItem_Detail_All.Form!txtVS_Rotors.ColumnHidden = False
End If

Hope this helps.
Mark
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Text Box Width in Continuous Form Alan Microsoft Access Form Coding 1 11th Mar 2009 02:04 PM
Re: Continuous Form Maximum Width Douglas J. Steele Microsoft Access Forms 0 23rd Jan 2007 01:58 PM
More than 1 column in continuous form? =?Utf-8?B?TmluaWVs?= Microsoft Access 13 3rd Oct 2006 08:14 PM
Continuous Form Width in Subform =?Utf-8?B?TWFydGluTUNV?= Microsoft Access Forms 0 20th Jul 2005 08:58 PM
Column in Continuous Form Simon Microsoft Access Forms 0 26th Aug 2003 04:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:45 AM.