|
-
Jul 20th, 2005, 06:27 PM
#1
Thread Starter
Lively Member
[Resolved] Hide access tables
Does anyone know how to hide an access table via code (Table attributes set to hidden)? And then subsequently not show hidden objects (Tools-options-view-hidden objects)?
Thanks,
Last edited by whiteWay; Jul 21st, 2005 at 06:19 PM.
-
Jul 20th, 2005, 11:25 PM
#2
Re: Hide access tables
I looked into your question and discovered a solution. Its quite cool too! 
Hide Access Object
Gangsta Yoda 
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 
-
Jul 20th, 2005, 11:58 PM
#3
Re: Hide access tables
Never tried it yet but wow, thats a great snippet Gansta!
And may I ask its equivalent code if VB6.0?
-
Jul 21st, 2005, 12:10 AM
#4
Re: Hide access tables
Its the same thing except you need to instanciate a Access.Application object either early bound or late bound. Instead of using
the actual "Application" code you would switch it with you instanciated Application variable object.
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 
-
Jul 21st, 2005, 06:45 AM
#5
Frenzied Member
Re: Hide access tables
very useful... good job man.
-
Jul 21st, 2005, 12:03 PM
#6
Re: Hide access tables
Thats for the props Besoup Its always nice to hear positive feedback. 
This was so interesting when I found it. When you manually right click and show Options for a table and select Hidden, that
hidden is actually not really hidden if Access is set to display hidden objects. The table would appear ghosted but visible and
my code actually completely hides it.
Maybe I should add some more description to the CodeBank code explaining this?
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 
-
Jul 21st, 2005, 02:32 PM
#7
Frenzied Member
Re: Hide access tables
I haven't had time to try this out but does this keep them hidden even after you close and reopen the DB?
-
Jul 21st, 2005, 02:52 PM
#8
Re: Hide access tables
I replied in the CodeBank thread since it would be good for others not in this thread to know
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 
-
Jul 21st, 2005, 06:03 PM
#9
Frenzied Member
Re: Hide access tables
Good deal. Now the question is how to take over exclusive rights on a DB that is already open? :P
-
Jul 21st, 2005, 06:13 PM
#10
Re: Hide access tables
Why do you need to do that? If its opened Exclusive then attempting anything on it would possibly corrupt the DB.
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 
-
Jul 21st, 2005, 06:17 PM
#11
Thread Starter
Lively Member
Re: Hide access tables
Thanks, the code works like a charm.
What I found interesting in problem was that I had originally hidden these tables manually. I figured that these tables would stay hidden.
However when I touched one of these hidden tables (imported data into), they became unhidden....strange.
RW
-
Jul 21st, 2005, 06:24 PM
#12
Re: [Resolved] Hide access tables
How did you import the data? It must be updating some table properties after saving the changes from the import and not maintaining the Attribute.
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 
-
Jul 21st, 2005, 06:26 PM
#13
Frenzied Member
Re: Hide access tables
 Originally Posted by RobDog888
Why do you need to do that? If its opened Exclusive then attempting anything on it would possibly corrupt the DB.
I got a app that runs as a scheduled task, that runs a bit of code in a few of my DB's. If one is open I get an error and it won't run because it is opened exclusively.
-
Jul 21st, 2005, 06:30 PM
#14
Thread Starter
Lively Member
Re: [Resolved] Hide access tables
I imported the data directly from an excel worksheet using the spreadsheet import command.
The excel data is formatted like a table and directly imports into a temporary Access table with the same fields. I clean the temp table up and append to a Master table. I do not change any attribute or property information.
-
Jul 21st, 2005, 06:30 PM
#15
Re: [Resolved] Hide access tables
You can test for Exclusivitity (is that a word?) by trying to connect to it using ADO and passing the Exclusive parameter.
If its Ex then you can "try" to close it by terminating the process that has it open but you would probably need Admin rights to it.
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 
-
Jul 21st, 2005, 06:33 PM
#16
Frenzied Member
Re: [Resolved] Hide access tables
 Originally Posted by RobDog888
You can test for Exclusivitity (is that a word?) by trying to connect to it using ADO and passing the Exclusive parameter.
If its Ex then you can "try" to close it by terminating the process that has it open but you would probably need Admin rights to it. 
Cool, I will try that tomorrow when I am there... I R Admin
-
Jul 21st, 2005, 08:04 PM
#17
Re: [Resolved] Hide access tables
 Originally Posted by RobDog888
You can test for Exclusivitity (is that a word?) ...
Maybe it would be Exclusivity only.
And may I further ask, if the table is hidden by your snippet, could I still use it in VB? Like query it using "SELECT * FROM HiddenTable"? I have not tried using it though.
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
|