|
-
Mar 15th, 2006, 02:31 AM
#1
Thread Starter
Hyperactive Member
How to hide Queries...
Hi all,
Here i was strugling with hiding of queries..It sounds simple..but it is a big task for me,since i have around 100 queries to hide.I dont want to open each and every query and make its hidden property to true..
for hiding tables i used
VB Code:
tbldefs.attrirbutes=dbhiddentobject
Like wise dont i have any simple command for hiding queries also ???
Quick help in this regard will be greatly Appriciated.
Thanx & Regards
Srikanth.
The Difference between a Successful person and others is not a Lack of Knowledge,
But rather a Lack of WILL 
-
Mar 15th, 2006, 03:54 AM
#2
-
Mar 15th, 2006, 04:36 AM
#3
Re: How to hide Queries...
Sure 
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 15th, 2006, 06:17 AM
#4
Thread Starter
Hyperactive Member
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
The Difference between a Successful person and others is not a Lack of Knowledge,
But rather a Lack of WILL 
-
Mar 15th, 2006, 08:44 AM
#5
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 16th, 2006, 04:00 AM
#6
-
Mar 16th, 2006, 04:04 AM
#7
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...
-
Mar 16th, 2006, 12:17 PM
#8
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?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 16th, 2006, 09:40 PM
#9
-
Mar 17th, 2006, 12:11 AM
#10
Thread Starter
Hyperactive Member
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??
The Difference between a Successful person and others is not a Lack of Knowledge,
But rather a Lack of WILL 
-
Mar 17th, 2006, 12:41 AM
#11
Re: How to hide Queries...
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?
-
Mar 17th, 2006, 01:02 AM
#12
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|