Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 02-21-2010, 03:14 PM   #1
editolis
Panathinaikos Fun
 
editolis's Avatar
 
Join Date: Oct 2008
Location: Athens-Greece
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
editolis is on a distinguished road
Send a message via Skype™ to editolis
Arrow Hide / Unhide All forms - reports - Modules

Hi all,

Can someone show me how
we can hide / unhide with a command button: all forms,
reports and modules from a database?

Thank you in advance.

editolis is offline   Reply With Quote
Old 02-22-2010, 02:22 AM   #2
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,635
Thanks: 55
Thanked 996 Times in 962 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
Re: Hide / Unhide All forms - reports - Modules

how do you mean, hide?

can you not just set the startup properties to hide the database window? Is this simple enough, or are your users starting to investigate stuff.

You can set certain dbs objects as hidden, but then anyone can set them as unhidden by reversing the process.

so the discussion of exactly what you are trying to do, in terms of protecting various dbs objects becomes far more far-reaching.
__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the bottom left of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
Old 02-22-2010, 05:58 AM   #3
editolis
Panathinaikos Fun
 
editolis's Avatar
 
Join Date: Oct 2008
Location: Athens-Greece
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
editolis is on a distinguished road
Send a message via Skype™ to editolis
Re: Hide / Unhide All forms - reports - Modules

Dear Dave
There is no any particular reason.
I am just curious to find out.
So do have any suggestion?

editolis is offline   Reply With Quote
Old 02-22-2010, 06:10 AM   #4
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,635
Thanks: 55
Thanked 996 Times in 962 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
Re: Hide / Unhide All forms - reports - Modules

if you right click an item in the data-base window , you get properties

in the properties there is a check box to set this as hidden. There is then a database option to show/hide hidden objects.

------------
you will be able to get at this property in code by using the relevant property of the correct database container collection - it is cetainly doable, but i haven't ever used this, and it would take some digging out. Perhaps someonme else knows the exact systax
__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the bottom left of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
Old 02-22-2010, 06:15 AM   #5
editolis
Panathinaikos Fun
 
editolis's Avatar
 
Join Date: Oct 2008
Location: Athens-Greece
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
editolis is on a distinguished road
Send a message via Skype™ to editolis
Re: Hide / Unhide All forms - reports - Modules

Here in this forum i find out how we can hide/unhide the qry's.

Can we do someyhing similar with forms-reports-modules?

The code for the qry's:
======================
Function HideQuerys()
Dim qry As QueryDef
Dim x As Integer

For Each qry In CurrentDb.QueryDefs

If Left(qry.Name, 1) <> "~" Then
If Not Left(qry.Name, 4) = "Usys" Then
qry.Name = "Usys" & qry.Name
End If
End If
Next
End Function
========================
Function UnHideQuerys()
Dim qry As QueryDef
Dim x As Integer

For Each qry In CurrentDb.QueryDefs

If Left(qry.Name, 1) <> "~" Then
If Left(qry.Name, 4) = "Usys" Then
qry.Name = Mid(qry.Name, 5)
End If
End If
Next
End Function
editolis is offline   Reply With Quote
Old 02-22-2010, 06:37 AM   #6
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,635
Thanks: 55
Thanked 996 Times in 962 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
Re: Hide / Unhide All forms - reports - Modules

usys queries are normally used for special internal queries

however, if you rename your queries, you may find that your forms etc stop working, as the references to these queries may not update.

copy the database, before trying this.

__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the bottom left of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Access Window Task Bar and Reports Lightwave General 3 08-20-2007 01:16 PM
Parameters for Forms/ Reports in 2002 fivestringfreak Forms 0 05-03-2006 08:15 PM
Security - Hide forms, display main form accessman2 General 0 12-07-2005 10:54 AM
Linking an Embedded Image from a Form to all Reports and other Forms dungstar Forms 2 03-10-2005 02:37 PM
Display reports in front of forms srideout2525 Reports 4 06-06-2004 11:33 PM




All times are GMT -8. The time now is 11:26 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