Hide text box with format in detail section (1 Viewer)

Suresh_Murugan

Registered User.
Local time
Today, 04:05
Joined
Aug 28, 2016
Messages
31
Hi all,

I was tried many times but didn't get a correct solution.
I prepared one database for project related. I have a 16 section and need 16 pages together one report in one click, everything was good. But one problem, few (1 or 2) sections is we consider not applicable, if "not applicable" pages shown "This section not applicable" in same detail section. If applicable Pages shown blank.
I want whichever pages showing "This section not applicable" text box with formatting and whichever pages not showing "This section not applicable" without formatting (means hidden text box). :banghead:
 
Last edited:

GinaWhipp

AWF VIP
Local time
Today, 07:05
Joined
Jun 21, 2011
Messages
5,901
Hmm, I'm not sure what you mean by *sheets*. I hope you are talking about Subreports. If you are something like...

Code:
    If Me.YourSubreport.Report.HasData Then
        Me.YourTextBox.Visible = True
    Else
        Me.YourTextBox.Visible = False
    End If
In the On_Format section of where the Text Boxes are located should work. If that is not what you meant going to need a little bit more, perhaps a screen shot?
 

Suresh_Murugan

Registered User.
Local time
Today, 04:05
Joined
Aug 28, 2016
Messages
31
Hi Gina,
Thanks for your reply. I has been edited sheets to pages. It's not subreport
all in one report, detail section. I was tried your code but haven't get correct. Also I has attached what we need, included with page numbers.
 

Attachments

  • Not Applicable with format (Same I want).JPG
    Not Applicable with format (Same I want).JPG
    37.7 KB · Views: 85
  • Applicable with format (I want WithOut Format).JPG
    Applicable with format (I want WithOut Format).JPG
    38.4 KB · Views: 91
  • Applicable with format (I want WithOut Format)_page 16.JPG
    Applicable with format (I want WithOut Format)_page 16.JPG
    34.8 KB · Views: 95

GinaWhipp

AWF VIP
Local time
Today, 07:05
Joined
Jun 21, 2011
Messages
5,901
Yeah, that code won't work for that, no Subreports. Okay, falling asleep 3:00 am where I am (and just signing off) so if I see no progress once I have gotten some sleep I'll post. In the interim. Am I understanding you just want to hide the TEXT or the entire TEXT Box (no borders)?
 

GinaWhipp

AWF VIP
Local time
Today, 07:05
Joined
Jun 21, 2011
Messages
5,901
Hmm, well I'm back! But I see you didn't get a chance to answer my question so I'll wait.
 

June7

AWF VIP
Local time
Today, 03:05
Joined
Mar 9, 2014
Messages
5,423
What data determines whether section is applicable or not? What code are you using to hide the text?
 

Suresh_Murugan

Registered User.
Local time
Today, 04:05
Joined
Aug 28, 2016
Messages
31
Yeah, that code won't work for that, no Subreports. Okay, falling asleep 3:00 am where I am (and just signing off) so if I see no progress once I have gotten some sleep I'll post. In the interim. Am I understanding you just want to hide the TEXT or the entire TEXT Box (no borders)?

Hi Gine,

We need to hide entire TEXT BOX (No Borders)
 

GinaWhipp

AWF VIP
Local time
Today, 07:05
Joined
Jun 21, 2011
Messages
5,901
Okay, then what is the trigger? Is there a check box or something that indicates those Text Boxes are to be hidden? Without a trigger you are going to have do what we call *hard code* each one.
 

Suresh_Murugan

Registered User.
Local time
Today, 04:05
Joined
Aug 28, 2016
Messages
31
Okay, then what is the trigger? Is there a check box or something that indicates those Text Boxes are to be hidden? Without a trigger you are going to have do what we call *hard code* each one.

Hi Gine,

This related table field name is: Sec.No[tb], Descr[tb], Status[cbo- (Not applicale)]

Then report section textbox1[](Control Source: [Status]), then another textbox(Control Source: =IIf([Text11]="(Not Applicable)","This Section is Not Applicable to this System","")).

Then when I was open report status is not applicable working good, if blank it's showing same textbox with border. Refer to attached report design view.....
 

Attachments

  • report design view.jpg
    report design view.jpg
    98.6 KB · Views: 101

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:05
Joined
May 7, 2009
Messages
19,169
add code to the Detail's OnFormat event:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.txtBoxName.Visible = (Nz([Status],"(Not Applicable)") <> "(Not Applicable)")
End Sub
 

Suresh_Murugan

Registered User.
Local time
Today, 04:05
Joined
Aug 28, 2016
Messages
31
add code to the Detail's OnFormat event:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.txtBoxName.Visible = (Nz([Status],"(Not Applicable)") <> "(Not Applicable)")
End Sub

Hi Arnel,

Thanks for your answer.
I has been tried your module, but it was directly going to text box hidden properties.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:05
Joined
May 7, 2009
Messages
19,169
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.txtBoxName.Visible = (([Status] & "") <> "(Not Applicable)")
End Sub
 

Users who are viewing this thread

Top Bottom