|
-
Jun 16th, 2005, 06:42 AM
#1
Thread Starter
Don't Panic!
Property 'Sheet' Window - How to close?
Hi,
Access 2003
As far as I can recall, access 2000 and 97 never had the properties sheet re-appearing from design to showing the form. As an upgrade (for some unknown reason) MS have decided to make it appear if you had it open last time (any database) and didn't close it when on a form.
By any database I mean, that if you have a fairly secure db and you have the properties sheet closed, then close it - go to a new db open a form, open the properties window, close the form (save if neccessary). Reopen the 'secure' db and when a form opens, so does the properties sheet.
I know you can just close the sheet, but if a user opened the db and got the properties sheet, they may be inclined to uh nose around ... and in doing so accidentally delete something.
Anyone have a link or some code to get to the properties sheet and close it?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 16th, 2005, 11:10 AM
#2
Re: Property 'Sheet' Window - How to close?
I have seen this issue before too. I guess you just need to make sure that when saving a form's changes from design view, you need
to make sure you close the prop window first.
I suppose you could use the FindWindow, FindWindowEx, and SendMessage APIs to find the window handle of the property window so you
can sendmessage to it telling it to close.
I'll take a look and see if there is a built in method in Access for this though.
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 
-
Jun 17th, 2005, 03:31 AM
#3
Thread Starter
Don't Panic!
Re: Property 'Sheet' Window - How to close?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 17th, 2005, 03:54 AM
#4
Re: Property 'Sheet' Window - How to close?
i tried this in excel, (don't have access)
AppActivate "Properties", True
SendKeys "%{F4}", True
pete
-
Jun 17th, 2005, 07:49 AM
#5
Thread Starter
Don't Panic!
Re: Property 'Sheet' Window - How to close?
West:
But how do you check whether it is open or not?
Wouldn't the send keys close the sheet/db if it was open before all the calls?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 17th, 2005, 08:09 AM
#6
Re: Property 'Sheet' Window - How to close?
in excel at least if appactivate finds no window with title "Properties" it generates and error, if you just handle the error to exit sub or skip a line, then it will do nothing
pete
-
Jun 17th, 2005, 10:44 AM
#7
Re: Property 'Sheet' Window - How to close?
There are several toolbar buttons/menu items that are protected from automation. The property button is probably one of them.
Like I posted earlier, the FindWindow & FindWindowEx APIs will do the saerching part for the property window. TheSendMessage API can send
the command to close the property window if FindWindowEx finds 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 
-
Jun 21st, 2005, 07:36 AM
#8
Thread Starter
Don't Panic!
Re: Property 'Sheet' Window - How to close?
Just had a quick experiment with FindWindowEx .. looks hmm ok but the properties window doesn't have a title/caption of Properties - can MS make it any harder?
The title/caption is of whichever control it is in on opening... Or at least was here when I tested it.
Thanks though - I'll think on it some more...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 21st, 2005, 11:08 AM
#9
Re: Property 'Sheet' Window - How to close?
Since the prop window has a caption but it all depends on what was selected when the prop window was last closed, you could
just search for the class name only - "OArgDlg"
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
|