Alpha Video Training
Results 1 to 4 of 4

Thread: Executing external

  1. #1
    Member
    Real Name
    Dennis Mathias
    Join Date
    Aug 2000
    Posts
    231

    Default Executing external

    If I have a filename listed in a database field, is there a way I can launch the file with the associated application by clicking on it?

    For example if the field says:

    myletter.doc

    Can I somehow launch this and have MSWord load it?

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Executing external

    "If I have a filename listed in a database field, is there a way I can launch the file with the associated application by clicking on it? "

    No. You could have code for a button on a form which read the text from the field on the form, then use sys_open() to open the file "b"with the program so associated in Windows."/b"

    You might be able to do something similar with the onrowdblclick event for a browse.

    I don't have 4.5 here to experiment, you might have to use sys_shell().

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Executing external

    With the html

    "If I have a filename listed in a database field, is there a way I can launch the file with the associated application by clicking on it? "

    No. You could have code for a button on a form which read the text from the field on the form, then use sys_open() to open the file with the program so associated in Windows.

    You might be able to do something similar with the onrowdblclick event for a browse.

    I don't have 4.5 here to experiment, you might have to use sys_shell().

  4. #4
    Member
    Real Name
    John Berry
    Join Date
    Nov 2007
    Location
    Maryland, USA
    Posts
    652

    Default Re: Executing external

    Hi Stan (or anyone),

    I am new to the desktop world and this is something I need to do but I don't know how to get the field value.

    From other posts on here I've got this code on a button:

    if file.exists('C:\1_downloads\FW Residential Lease.msg') then
    sys_open('C:\1_downloads\FW Residential Lease.msg')
    else
    ui_msg_box("Error Opening File","File 'C:\1_downloads\FW Residential Lease.msg' does not exist.",ui_stop_symbol)
    end if

    and it works fine, the problem is I need for it to open whatever is in the field called MyLinkField. MyLinkField is a field on the form that contains data such as C:\1_downloads\FW Residential Lease.msg or 'C:\1_downloads\MyDocument.doc' etc. How do I reference the value in MyLinkField so the correct fiels will open, something like:

    if file.exists('MyLinkField) then
    sys_open(MyLinkField)
    else
    ui_msg_box("Error Opening File","File MyLinkField does not exist.",ui_stop_symbol)
    end if

    Thanks

    -John

    Sorry, I am using version 11, I just noticed this is a version 4 post!
    Last edited by Jberry; 05-04-2012 at 11:33 AM. Reason: Edit:

Similar Threads

  1. Is current executing Function Name available?
    By csda1 in forum Alpha Five Version 6
    Replies: 5
    Last Post: 09-10-2004, 02:25 PM
  2. Executing Forms
    By John Psihos in forum Alpha Five Version 5
    Replies: 2
    Last Post: 10-29-2003, 06:42 PM
  3. Executing an external program with args.
    By Larry Treachler in forum Alpha Five Version 5
    Replies: 8
    Last Post: 10-14-2003, 12:46 PM
  4. Executing DOS modules
    By Jim VanGelder in forum Alpha Five Version 4
    Replies: 3
    Last Post: 07-19-2000, 07:27 AM
  5. Executing an external program
    By Rodger Bailey in forum Alpha Five Version 4
    Replies: 4
    Last Post: 06-09-2000, 12:19 PM

Bookmarks

Posting Permissions

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