Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2014
    Posts
    1

    Unanswered: VNC from Access 2010 form

    We use access to track our equipment and I'd like to add a button to launch VNC to remote to the PC.
    I launch VNC this way

    Private Sub Command40_Click()
    Dim stAppName As String


    stAppName = "c:\program files\tightvnc\tvnviewer.exe"
    Call Shell(stAppName, 1)
    End Sub

    _________________________
    I have a field "Id_1" that contains the part of the machine name.
    Lets say the value of Id_1 is 1234
    but the machine name on the network is TEST-1234
    Is there a way to have the button populate the VNC field with TEST-1234 ?

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Provided that the profix of the machine mane is alway Test-, you could use:
    Code:
    Private Sub Command40_Click()
    
        Dim stAppName As String
    
        Me.VNC_field = "TEST-" & Me.Id_1.Value
        stAppName = "c:\program files\tightvnc\tvnviewer.exe"
        Call Shell(stAppName, 1)
    End Sub
    Notes:
    - Replace VNC_field with the actual name of the control on your form.
    - You should rename the command button to something more meaningful than Command40
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •