Free Lessons
Fast Tips
Topic Index
Home   Courses   Seminars   Templates   TechHelp   Forums   Help   Contact   Join   Order   Logon  
Home > Help > DevNet >
Access Developer Network

Back to Access Developer Network

Reports Upload Images   Link  
Igor Tomasec 
5 months ago

How can I hide fields on a report based on the value of one field without VBA? I made an inspection of a machine and entered it into the database. Now I want to create a report with just the necessary information about the condition of the machine. So if "Visual Inspection"  was answered with "good" there is no need to list the next 6 questions that ask if the inside,outside,bottom e.g. is "good". Due to company regulations I can't use VBA.

Please help. Thank you very much!
Best Regards!
Kevin Yip
5 months ago
In your report's Format event, you check that if the inspection *is not* good, you make the other items visible, and vice versa.  The procedure should look like:

Private Sub MyReport_Format()
     Dim b As Boolean
     b = (Me.Visual.Inspection <> "good")
     Me.Textbox1.Visible = b
     Me.Textbox2.Visible = b
     Me.Textbox3.Visible = b
End Sub
Igor Tomasec
5 months ago
Hi Kevin, thanks for your answer. But you are using a VBA script arent you? Or can you use this in the embedded macros? Because I am not allowed to use VBA
Kevin Yip
5 months ago
You can enable VBA by going to File -> Options -> Trust Center -> Trust Center Settings -> Macro settings -> Enable VBA.
Igor Tomasec
5 months ago
Hello Kevin, The Problem is not that I can't enable it. The problem is that our company has locked VBA system wide. So If I get it running with VBA nobody else can use it.
Kevin Yip
5 months ago
You may ask whoever in charge of this in your company to write the VBA code for you.  As you see in my example, the code isn't complicated.  To make these kinds of design changes on the database, it's better to ask the admin to do it for you even if you have the skills and are allowed to do it, since this may involve company polices, chain of command, that kind of thing.
Richard Rost
5 months ago
I'm not a big fan of macros but one of my members actually asked me a similar question to this a week or so ago so it's on my list for a video. You'd be surprised how many companies out there are locking down systems so that people can't use VBA. But yes you can do this with a macro and I'll show you how soon.
Kevin Robertson
5 months ago

If your company doesn't allow the use of VBA you can certainly use a Macro. The screenshot below shows how. It's actually quite simple.

Richard replied as I was building and creating the image. LOL. Looking forward to the video though.
Kevin Robertson
5 months ago

This thread is now closed. If you wish to comment, start a NEW discussion, below.

Back to Access Developer Network Comments

Start a NEW Conversation
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
Subscribe to Access Developer Network
Get notifications when this page is updated

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

Copyright 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 10/4/2023 5:09:11 AM.