Thanks Duane
because with the hide property the border of the fields are also hidden.
Ciao
Domenico
Il giorno mar 21 apr 2020 alle ore 14:08 Duane Hookom <duanehookom@hotmail.com> ha scritto:
I would first consider just hiding the control. Select all of the controls to hide and enter "Hide" into their Tag properties.
I'm not sure where your decision to display or not comes from but set the booHide and run the code.
Dim ctlVar As Control
Dim booHide As Boolean
booHide = False
For Each ctlVar In Me.Controls
If ctlVar.Tag = "Hide" Then
ctlVar.Visible = Not booHide
End If
Next
Regards,Duane
From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of crystal (strive4peace) via groups.io <strive4peace2008=yahoo.com@groups.io>
Sent: Tuesday, April 21, 2020 2:21 AM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: Re: [MSAccessProfessionals] Change Forecolor and backcolorhi Domenico,
you may want to test:
If ctlVar.FormatConditions.count >0 Then
unless there is a specific reason you only want to change it if it has exactly 1
kind regards,
crystal
On 4/21/2020 1:39 AM, domcoz wrote:
Thanks Duane,
I modified the code like this:
Dim ctlVar As control
For Each ctlVar In Me.Controls
If ctlVar.visible = True Then
Select Case ctlVar.ControlType
Case acTextBox
On Error Resume Next
If ctlVar.FormatConditions.count = 1 Then
ctlVar.FormatConditions.Delete
End If
ctlVar.ForeColor = RGB(255, 255, 255)
ctlVar.BackColor = RGB(255, 255, 255)
End Select
End If
Next
I'll explain: I have a complex report and my boss asked me to be able to print it without values. and then I thought about this trick.
Thanks a lot,.
Domenico
_._,_._,_
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#115475) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]
_._,_._,_
Tidak ada komentar:
Posting Komentar