Alpha DevCon 2018
Results 1 to 5 of 5

Thread: A Newbie in need of Help...

  1. #1
    Member
    Real Name
    Billy Stroud
    Join Date
    Jan 2009
    Location
    Iowa
    Posts
    11

    Default A Newbie in need of Help...

    Hi Everyone
    I like much of you, have finally started the transaction from A4 to A5. I have used an Application I made for probably 8 years in my work and it has served us well. But new Computers and operating systems has forced me to this point. I have found this site extremely helpful. But I have run into a problem that I can't find an answer. I have never written code for anything and that may be my biggest issue. So here we go.... I am trying to use data in a field as a file name in another program and have that program and file open with a Button.. Example, Field (ID) contains a 6 digit number (209001) this coincides witha Wordpad file named (209001.rft). I would like the button to launch Wordpad and put in the filename (209001) and open the file...
    Is this possible? I can get the Wordpad to launch from a button, easy...
    Then go (File) (Open) type in (209001) and it will open. I have also gotten a Button to put the (209001) into a variable and then tried opening a file. But it always returns (File 209001 not present) or something close to that. Could it be it doesn't know the file path like (C:\alpha5data\layouts)?
    Any help would be greatly appreciated....
    Thank You
    Bill (1974)

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

    Default Re: A Newbie in need of Help...

    Context is important. Do you have a form open with the id field showing? Is the objectname of the id field also object?

    sys_open(pathtofile+chr(92)+id.value+".rtf")

    would be the code for a button assuming all the rtf files are stored in the same directory.

    In your example pathtofile would be "C:\alpha5data\layouts"

    The objectname is revealed by examining its properties.

  3. #3
    Member
    Real Name
    Billy Stroud
    Join Date
    Jan 2009
    Location
    Iowa
    Posts
    11

    Default Re: A Newbie in need of Help...

    Quote Originally Posted by Stan Mathews View Post
    Context is important. Do you have a form open with the id field showing? Is the objectname of the id field also object? sys_open(pathtofile+chr(92)+id.value+".rtf")

    would be the code for a button assuming all the rtf files are stored in the same directory.

    In your example pathtofile would be "C:\alpha5data\layouts"

    The objectname is revealed by examining its properties.
    Question 1 Yes...
    Question 2 What? (I'm a Newbie)

    Thank you

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,844

    Default Re: A Newbie in need of Help...

    The objectname is revealed by examining its properties. Select (left click on while in design mode) the id field as represented on the form. Right click on the object and examine the object name. (in the area under the heading "Field Description".

  5. #5
    Member
    Real Name
    Billy Stroud
    Join Date
    Jan 2009
    Location
    Iowa
    Posts
    11

    Default Re: A Newbie in need of Help...

    Hi Stan
    You Rock, The code you sent me worked perfect. You are the Man......

Similar Threads

  1. Newbie needs help
    By flyer296 in forum Alpha Five Version 8
    Replies: 3
    Last Post: 03-25-2008, 09:11 AM
  2. Please help a newbie if you can
    By A5student in forum Alpha Five Version 8
    Replies: 4
    Last Post: 03-20-2008, 09:49 AM
  3. Newbie ??
    By Rick-VA in forum Alpha Five Version 7
    Replies: 2
    Last Post: 10-28-2006, 08:58 PM
  4. Newbie ???
    By Peter DeBilio in forum Alpha Five Version 5
    Replies: 3
    Last Post: 02-01-2003, 11:02 AM
  5. help for a newbie
    By Ubaldo Passamonti in forum Alpha Five Version 5
    Replies: 4
    Last Post: 07-30-2002, 05:48 AM

Posting Permissions

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