Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-09-2019, 07:40 PM   #1
Suresh_Murugan
Newly Registered User
 
Join Date: Aug 2016
Posts: 31
Thanks: 18
Thanked 0 Times in 0 Posts
Suresh_Murugan is on a distinguished road
Hide text box with format in detail section

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).


Last edited by Suresh_Murugan; 08-09-2019 at 10:41 PM.
Suresh_Murugan is offline   Reply With Quote
Old 08-09-2019, 07:48 PM   #2
GinaWhipp
AWF VIP
 
GinaWhipp's Avatar
 
Join Date: Jun 2011
Location: Ohio, USA
Posts: 5,361
Thanks: 20
Thanked 892 Times in 877 Posts
GinaWhipp has a spectacular aura about GinaWhipp has a spectacular aura about
Re: Hide text box with format in detail section

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?
__________________
Gina Whipp
Microsoft MVP (Access 2010-2015)


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GinaWhipp is offline   Reply With Quote
The Following User Says Thank You to GinaWhipp For This Useful Post:
Suresh_Murugan (08-11-2019)
Old 08-09-2019, 10:53 PM   #3
Suresh_Murugan
Newly Registered User
 
Join Date: Aug 2016
Posts: 31
Thanks: 18
Thanked 0 Times in 0 Posts
Suresh_Murugan is on a distinguished road
Re: Hide text box with format in detail section

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.

Suresh_Murugan is offline   Reply With Quote
Old 08-09-2019, 11:02 PM   #4
GinaWhipp
AWF VIP
 
GinaWhipp's Avatar
 
Join Date: Jun 2011
Location: Ohio, USA
Posts: 5,361
Thanks: 20
Thanked 892 Times in 877 Posts
GinaWhipp has a spectacular aura about GinaWhipp has a spectacular aura about
Re: Hide text box with format in detail section

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)?
__________________
Gina Whipp
Microsoft MVP (Access 2010-2015)


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GinaWhipp is offline   Reply With Quote
The Following User Says Thank You to GinaWhipp For This Useful Post:
Suresh_Murugan (08-11-2019)
Old 08-10-2019, 08:50 AM   #5
GinaWhipp
AWF VIP
 
GinaWhipp's Avatar
 
Join Date: Jun 2011
Location: Ohio, USA
Posts: 5,361
Thanks: 20
Thanked 892 Times in 877 Posts
GinaWhipp has a spectacular aura about GinaWhipp has a spectacular aura about
Re: Hide text box with format in detail section

Hmm, well I'm back! But I see you didn't get a chance to answer my question so I'll wait.
__________________
Gina Whipp
Microsoft MVP (Access 2010-2015)


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GinaWhipp is offline   Reply With Quote
The Following User Says Thank You to GinaWhipp For This Useful Post:
Suresh_Murugan (08-11-2019)
Old 08-10-2019, 09:34 AM   #6
June7
Newly Registered User
 
June7's Avatar
 
Join Date: Mar 2014
Location: The Great Land
Posts: 2,149
Thanks: 0
Thanked 503 Times in 499 Posts
June7 will become famous soon enough June7 will become famous soon enough
Re: Hide text box with format in detail section

What data determines whether section is applicable or not? What code are you using to hide the text?
__________________
Attach File Manager is below Advanced editor window, click Go Advanced below Quick Reply window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
June7 is offline   Reply With Quote
The Following User Says Thank You to June7 For This Useful Post:
Suresh_Murugan (08-11-2019)
Old 08-10-2019, 06:33 PM   #7
Suresh_Murugan
Newly Registered User
 
Join Date: Aug 2016
Posts: 31
Thanks: 18
Thanked 0 Times in 0 Posts
Suresh_Murugan is on a distinguished road
Re: Hide text box with format in detail section

Quote:
Originally Posted by GinaWhipp View Post
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)

Suresh_Murugan is offline   Reply With Quote
Old 08-10-2019, 06:55 PM   #8
GinaWhipp
AWF VIP
 
GinaWhipp's Avatar
 
Join Date: Jun 2011
Location: Ohio, USA
Posts: 5,361
Thanks: 20
Thanked 892 Times in 877 Posts
GinaWhipp has a spectacular aura about GinaWhipp has a spectacular aura about
Re: Hide text box with format in detail section

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.
__________________
Gina Whipp
Microsoft MVP (Access 2010-2015)


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GinaWhipp is offline   Reply With Quote
The Following User Says Thank You to GinaWhipp For This Useful Post:
Suresh_Murugan (08-11-2019)
Old 08-10-2019, 07:52 PM   #9
Suresh_Murugan
Newly Registered User
 
Join Date: Aug 2016
Posts: 31
Thanks: 18
Thanked 0 Times in 0 Posts
Suresh_Murugan is on a distinguished road
Re: Hide text box with format in detail section

Quote:
Originally Posted by GinaWhipp View Post
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.....
Attached Images
File Type: jpg report design view.jpg (98.6 KB, 11 views)
Suresh_Murugan is offline   Reply With Quote
Old 08-10-2019, 08:05 PM   #10
arnelgp
Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 7,992
Thanks: 64
Thanked 2,545 Times in 2,444 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Hide text box with format in detail section

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
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
Suresh_Murugan (08-11-2019)
Old 08-10-2019, 11:14 PM   #11
Suresh_Murugan
Newly Registered User
 
Join Date: Aug 2016
Posts: 31
Thanks: 18
Thanked 0 Times in 0 Posts
Suresh_Murugan is on a distinguished road
Re: Hide text box with format in detail section

Quote:
Originally Posted by arnelgp View Post
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.
Suresh_Murugan is offline   Reply With Quote
Old 08-10-2019, 11:51 PM   #12
arnelgp
Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 7,992
Thanks: 64
Thanked 2,545 Times in 2,444 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Hide text box with format in detail section

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.txtBoxName.Visible = (([Status] & "") <> "(Not Applicable)")
End Sub

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
Suresh_Murugan (08-11-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Detail Section text box Highlight issue Suresh_Murugan Reports 14 10-10-2017 11:06 PM
Hide detail section of a report with criteria genesis Reports 3 10-11-2009 05:39 PM
ON FORMAT event - Detail Section Daveyk01 Reports 1 07-20-2007 10:35 AM
Hide the Detail section cedtech23 Forms 3 06-02-2006 11:55 AM
Report Detail Section - formating text box stevemccauley Reports 5 05-15-2002 07:30 PM




All times are GMT -8. The time now is 07:17 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World