Results 1 to 3 of 3
  1. #1
    gabtrat is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    2

    launch computer in Remote Desktop from Access

    I'm working on an Access (2007) database for my company computers, printers, etc.


    I have a field called "Network_Name" that shows a computer's network name. I'd like to make a button that automatically launches that computer in Remote Desktop.

    As an example of the command line usage, this would open the computer "ADM-01" in Remote Destkop:
    C:\Windows\System32\mstsc.exe /v:"ADM-01"

    I need to replace "ADM-01" with whatever is in the "Network_Name" text box.

    I can get Remote Desktop to launch using "RunApp", but it's over my head how to use a variable to take the value of in my text box.

    Thanks for your help!

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    is the computer name displayed on a form?

    if so you would use something like this:

    dim sAppString

    sAppString = "C:\Windows\System32\mstsc.exe /v: " & chr(34) & forms!formname!fieldname & chr(34)
    Call Shell(stAppString, 1)

    Where FORMNAME and FIELDNAME would be the name of your form and the field in which the computer name is displayed

    Chr(34) inserts the " mark into your string

  3. #3
    gabtrat is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    2
    lol, it was getting an error and then I realized you had "sAppString" twice and then "stAppString" the 3rd time. After correcting the typo it worked like a charm.

    Thanks for the quick response!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Remote Desktop Database Needs Help
    By DianeG in forum Database Design
    Replies: 4
    Last Post: 04-05-2011, 04:25 PM
  2. Access and Remote Desktop
    By pedsys in forum Access
    Replies: 1
    Last Post: 10-08-2010, 10:42 AM
  3. offline remote access f/e sql b/e
    By hyperionfall in forum Access
    Replies: 3
    Last Post: 08-23-2010, 09:07 PM
  4. Remote Access
    By treva26 in forum Access
    Replies: 1
    Last Post: 09-03-2009, 06:56 AM
  5. Remote database access
    By marleyuk in forum Programming
    Replies: 0
    Last Post: 01-15-2009, 01:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums