Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Log Off a Remote Desktop Connection User Using Access VBA

Posted on 2008-06-21
6
Medium Priority
?
2,419 Views
Last Modified: 2013-11-28
I have 70+ users that hammer my Access 2003 application via Remote Desktop Connection with an average of about 20 logged in at any time.

Although they have been trained to use the proper logoff procedure, I still have users that exit my application and 'X' to close the RDC session rather than Start/Logoff.  Terminal Services reports those users as disconnected but doesn't release the "seat" or resources.

I need a Windows call or script that I can execute on form close that will perform the Start, Logoff, Yes sequence.


Best regards,
 
Rick Farris
{ contact info removed by PenguinMod, EE Moderator }
0
Comment
Question by:rhfarris
6 Comments
 
LVL 31

Assisted Solution

by:Toni Uranjek
Toni Uranjek earned 200 total points
ID: 21837009
Hi rhfarris,

Configure your server to end disconnected sessions in tscc.msc or Group Policy.

"Designing Terminal Server Connection Configurations"
http://technet2.microsoft.com/windowsserver/en/library/c800698b-d5ce-4e71-aba6-3d3a5d3440b11033.mspx?mfr=true

Setting that you are looking for is called "End a disconnected session" on "Logon settings" tab in properties of RDP-Connector in tscc.msc.

HTH

Toni
0
 
LVL 12

Accepted Solution

by:
nexusnation earned 800 total points
ID: 21837057
On form close, you can run shutdown.exe:

Shell("shutdown.exe -l", 1)

The switch -l performs a log-off.  For more info, type "shutdown /?" from the command prompt.

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21837469
you can design your access application with disabled (X) and File>Exit

How to disable the Close button on the Application window and the Exit command on the File menu

http://support.microsoft.com/?kbid=300688

0
 

Author Comment

by:rhfarris
ID: 21837480
I failed to indicate they were Xing out of the RDC window.  The app requires them to use a close button (X is disabled)
0
 

Expert Comment

by:08454580116
ID: 21867846
Does anybody know how to create a simple icon to allow that can be used to close the remote desktop connection that you are in.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question