473,804 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hiding Queries

Hello

I am using MSACCESS 2000

I can hide Tables from appearing in the Database Window with the following
code:

For Each tbldef in MyDB.TableDefs
tbldef.Attribut es = dbHiddenObject
Next tbldef

How can I do the same with the Queries, to hide them in the Database Window?

Or how can I prevent someone from importing Queries in MDB1 from MDB2 when
this someone belongs to the same
Work Group as MDB1and has Open/Run permission on MDB1.?

By hiding the Tables in MDB1 it looks as if importing through the import
wizards (under File in MSACCESS) is impossible
and I would like this to also be the case for the Queries in MDB1

Thanks

G.Gerard
Nov 16 '06 #1
3 4214
On Thu, 16 Nov 2006 22:50:01 GMT, "G Gerard" <gg*****@nbnet. nb.ca>
wrote:

I don't know how to do that programmaticall y, but I do know what
you're doing with the tabledef is very bad. You should not assign
dbHiddenObject, but rather use the bitwise Or operator to set that
bit.

-Tom.
>Hello

I am using MSACCESS 2000

I can hide Tables from appearing in the Database Window with the following
code:

For Each tbldef in MyDB.TableDefs
tbldef.Attribut es = dbHiddenObject
Next tbldef

How can I do the same with the Queries, to hide them in the Database Window?

Or how can I prevent someone from importing Queries in MDB1 from MDB2 when
this someone belongs to the same
Work Group as MDB1and has Open/Run permission on MDB1.?

By hiding the Tables in MDB1 it looks as if importing through the import
wizards (under File in MSACCESS) is impossible
and I would like this to also be the case for the Queries in MDB1

Thanks

G.Gerard
Nov 17 '06 #2
On Thu, 16 Nov 2006 22:50:01 GMT, "G Gerard" <gg*****@nbnet. nb.cawrote:
>Hello

I am using MSACCESS 2000

I can hide Tables from appearing in the Database Window with the following
code:

For Each tbldef in MyDB.TableDefs
tbldef.Attribut es = dbHiddenObject
Next tbldef

How can I do the same with the Queries, to hide them in the Database Window?

Or how can I prevent someone from importing Queries in MDB1 from MDB2 when
this someone belongs to the same
Work Group as MDB1and has Open/Run permission on MDB1.?

By hiding the Tables in MDB1 it looks as if importing through the import
wizards (under File in MSACCESS) is impossible
and I would like this to also be the case for the Queries in MDB1

Thanks

G.Gerard
I would strongly advise against using the above code. There was a known bug in
A97 whereby tables hidden with this code would be deleted during a compact.
http://www.mvps.org/access/bugs/bugs0036.htm

I don't know if this bug has been fixed, but I wouldn't do it anyway.

If you name your queries so that the first 4 characters are "USys"
eg USys_qMyQuery
The query will be treated as a system object (like the MSys tables) and will be
hidden from view unless View System Objects is ticked in Options.

Wayne Gillespie
Gosford NSW Australia
Nov 17 '06 #3
"G Gerard" <gg*****@nbnet. nb.cawrote in message
<tW************ *******@ursa-nb00s0.nbnet.nb .ca>:
Hello

I am using MSACCESS 2000

I can hide Tables from appearing in the Database Window with the
following code:

For Each tbldef in MyDB.TableDefs
tbldef.Attribut es = dbHiddenObject
Next tbldef

How can I do the same with the Queries, to hide them in the Database
Window?

Or how can I prevent someone from importing Queries in MDB1 from MDB2
when this someone belongs to the same
Work Group as MDB1and has Open/Run permission on MDB1.?

By hiding the Tables in MDB1 it looks as if importing through the
import wizards (under File in MSACCESS) is impossible
and I would like this to also be the case for the Queries in MDB1

Thanks

G.Gerard
As others have stated, be careful with the dbHiddenObject! Another
option, which I don't think has the same disadvantages, is using
the newer (available from the 2000 version, I think)

Application.Set HiddenAttribute <objecttype>, <objectname>, <boolean>

i e

Application.Set HiddenAttribute acQuery, "qryMyQuery ", True

--
Roy-Vidar
Nov 17 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5498
by: PMBragg | last post by:
Thank you in advance for any and all assistance. Is there a way to hide the Main Access window with tables, queries, forms etc programmatically? Michael
2
2042
by: Noloader | last post by:
Hello, Access XP, SQL Server 2000 Is it possible to hide a SP under Queries in Access, yet still be able to Execute it from Access? (Similar to hiding Tables, then using Views) We hooked up a custom form to accept the input parameters (MS Feature Request!) for the Stored Procedure. We had two problems with MS's
2
1772
by: GGerard | last post by:
Hello I'm looking for a way to hid tables and/or queries so that they cannot be viewed by someone opening the database with a full version of MSAccess. It has to appear as if there are no tables or queries in the database.
17
2922
by: Bob Weiner | last post by:
What is the purpose of hiding intead of overriding a method? I have googled the question but haven't found anything that makes any sense of it. In the code below, the only difference is that when the Poodle is upcast to the Dog (in its wildest dreams) it then says "bow wow" where the bernard always says "woof" (see code). Basically, it appears that I'm hiding the poodle's speak method from everything except the poodle. Why would I...
9
4987
by: bob | last post by:
Hi, I know there exists a good reason why the designers of c++ decided that function hiding should exist. But I don't know why. Can anybody provide a good reason/example of a case where function hiding saves the day. I know there exists one, I'd just like to hear about it. thanks and have a nice day.
3
6581
by: Nicolas Castagne | last post by:
Hi all, I have been wondering for a while why function hiding (in a derived class) exists in C++, e.g. why when writing class Base { void foo( int ) {} }; class Derived: public Base { void foo( char const ) {} };
5
3211
by: BA | last post by:
Hi there I am trying to write an "application" in Access 2000, that displays a front end and allows the user to interact with the database without seeing Access loaded, in the background, nor on the taskbar. When I click on the generate report button, from the front-end's form, no report/query is displayed. However, if i disable the code that "hides" Access, the reports and queries work perfectly. How do I get this functionality...
17
2035
by: rohitchawla | last post by:
i am trying to show and hide a div when onmouseover and onmouseover another div element. i am setting a setTimeout duration on onmouseout to delay the hiding of div for around two second The problem is that when i mouseover an element and then onmouseout it and then back again mouseovers that element before the timeout, the element still gets hidden so i put a flag=1 when i mouseover the element and flag=0 at mouseout and checked the value...
162
10327
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you prefix them with 2 underscores, but I hate prefixing my vars, I'd rather add a keyword before it. Python advertises himself as a full OOP language, but why does it miss one of the basic principles of OOP? Will it ever be added to python?
0
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10089
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9171
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.