Microsoft
Software
Hardware
Network
Question : How to completely hide columns in Access 2007
I have an Access report that I want to have display certain columns based on parameters that I pass to it. I can almost acheive the effect that I want be setting the width of the columns I want to hide to 0 and the visible parameter to false, but that still leaves space on the report for the borders around the textboxes. I've tried setting the BorderStyle property to 0 or 1, the BorderWidth property to 0 etc. without luck. Any ideas?
Additional weird effect: setting the BorderStyle property seems to re-order the columns in the report unpredictably.
Currently, I set all the columns in question to 'invisible':
UnitCount.Width = 0
UnitCount.Visible = False
UnitCount.BorderStyle = 0 '0= transparent 1=solid
UnitCount.BorderWidth = 0 '0=hairline other = pt
UnitCount.GridlineWidthLef
t = 0
UnitCount.GridlineWidthRig
ht = 0
And then set the ones I want to see to 'visible':
If (InStr(1, args, "M") > 0) Then
typeCount = typeCount + 1
UnitCount.Width = 0.4354 * 1440
UnitCount.Visible = True
UnitCount.BorderStyle = 1
End If
But this leaves gaps between the textboxes, which isn't acceptable for me.
Answer : How to completely hide columns in Access 2007
Here is one with "Borders"
Again, let me know if this is what you want
;-)
JeffCoachman
Access--Basic-SampleSelectHideSh.mdb
(212 KB)
(File Type Details)
sample
Random Solutions
Vista download fails with 0x80070718 error message
Excel closes unexpectedly, without saving work when opening outlook e-mail
VBA code to rename file based on cell value
Object doesn't support this property or method error in IE8
warning LNK4089: all references to "WSOCK32.dll" discarded by /OPT:REF
WCF and basicHttp Error
Login - Username and Password
Am trying to get a MAS90 VI Job to run from WinExec(). Runs fine from command prompt, but not from WinExec().
Active Directory Move & Upgrade
Unlocking file in WPF