Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    2

    Unanswered: Adding a command button to open up different file

    I have a form that has multipule entries. I want to add a button that is link to a field. That way when i input a file name into the file i can click on the command button and have it open up the file i am looking for.

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    I use code like this in my main menu program for terminal servers (you have to supply the stAppName):

    stDirA = DLookup("[Value]", "MainControl", "[Code]='AccessExeDirectory' ")
    stDirS = DLookup("[Value]", "MainControl", "[Code]='SystemMdwDirectory' ")
    stPath = stDirA & "MSACCESS.EXE /runtime /wrkgrp " + Chr(34) + _
    stDirS & "SYSTEM.MDW" + Chr(34) + " " + Chr(34)
    If stAppName = "Pay" Then
    stAppName = stPath + Locate + "\" + stAppName + ".mdb" '+ Chr(34) ' + " /excl"
    Else
    stAppName = stPath + Locate + "\" + stAppName + ".mde" '+ Chr(34) ' + " /excl"
    End If

    Call Shell(stAppName, 1)

    Use the /excl at your own risk.

Posting Permissions

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