Re: How to hide Queries...
HI,
do you mean to say you want to hide the queries in your database window? Are you using MS Access? Am I correct on this?
:) :) :)
Re: How to hide Queries...
Sure :D
Check out my CodeBank entry on hiding db objects for Access.
http://www.vbforums.com/showthread.php?t=350669
Just use the QueryDefs collection instead of TableDefs. ;)
It hides object even if you select the option > "Show Hidden Objects" so dont forget your object name.
Re: How to hide Queries...
Hi rob,
Thanks for the code..
but this was not getting successed when i use Query Def instead of tabledef.
VB Code:
Application.CurrentDb.querydefs(Q_Name).Properties("Attributes").Value = dbHiddenObject
what i have to do...
n,KG...
Yep..u r perfectly right..Im using Access only..
Thanks & Regards
Srikanth
Re: How to hide Queries...
Yup, there doesnt "appear" to be a "attributes" property. Here are the available ones:
NameMap
DOL
GUID
DefaultView
Orientation
OrderByOn
RecordLocks
Prepare
CacheSize
StillExecuting
MaxRecords
RecordsAffected
ODBCTimeout
ReturnsRecords
Connect
Updatable
SQL
Type
LastUpdated
DateCreated
Name
I bet there is still something that designates if its hidden or not as if you right click on the query and select hidden. It would be that property but set to the different true hidden constant value.
Re: How to hide Queries...
Hi,,,
How about just manually setting the hidden property of the queries...You do this by right clicking on the query and check it's hidden property..While not having figure out of the code...
:) :) :)
Re: How to hide Queries...
VB Code:
Application.CurrentDb.QueryDefs(queryname).Properties("attributes").Value = dbHiddenObject
RD,
Is this code specific in DAO? Do you know the equivalent of that code in ADO? Maybe ADO has some functions enhanced compare to DAO...
:) :) :)
Re: How to hide Queries...
This code is Access Object Model. It doesnt appear to work yet for QueryDefs but in 2003 ADO and DAO are default references in a module.
Did you check out the CodeBank link from post #3 yet?
Re: How to hide Queries...
Yep, the post was great and educational...
What i mean is for the querydefs and not the tabledefs...I made a research in DAO and it seems to me that theres no attribute property for the querydefs as what you have stated in the previous post..So, i guess we have to stick to the manual hiding of objects huh...
:) :) :)
Re: How to hide Queries...
is that finalized....
Can't i have any other way..
I have around hudreds of queries..
selecting each and every one and making their property as hidden..is not a small task..
isn't it??
Re: How to hide Queries...
Quote:
I have around hudreds of queries..
selecting each and every one and making their property as hidden..is not a small task..
isn't it??
Lots of queries you got there..Based on my research queries have no attributes property...I dont have a clue whether some of the experts here knows how to do that..If they do, well be pleased if they can share their knowledge..Maybe you can set them manually if you have extra time.. ;)
I am hoping that new versions of access will be capable of doing a marquee selection on the objects like queries then changing the attributes..What do you think huh?
:) :) :)
Re: How to hide Queries...
You may want to check into ADOX and see if you can gain access to some attribute property for the queries that way.