Alpha Video Training
Results 1 to 4 of 4

Thread: Use character field to reference image file

  1. #1
    VAR Howard G. Cornett's Avatar
    Real Name
    Howard Cornett
    Join Date
    Feb 2003
    Location
    Lexington, MA
    Posts
    666

    Default Use character field to reference image file

    I have a database where I want the user to be able to select the image he would like to use as a logo. I therefore have a field on a defaults table that is the logo path, stored as a character field. How can I place an image on a form in the database and have it lookup the value in this field as the image path in order to display the logo of the users choice? This also makes it easy for the user to change the logo at any time in the future.

    Howard

  2. #2
    VAR
    Real Name
    John Lemisch
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    673

    Default RE: Use character field to reference image file

    DIM filename as c
    filename = a5_eval_expression("=Fileloc3")
    if file.exists(filename) then
    sys_open(filename)
    else
    ui_msg_box("Error Opening File","File '"+filename+"' does not exist.",ui_stop_symbol)
    end if

    'note: where "fileloc3" = path\filename
    'works via file association

  3. #3
    VAR Howard G. Cornett's Avatar
    Real Name
    Howard Cornett
    Join Date
    Feb 2003
    Location
    Lexington, MA
    Posts
    666

    Default RE: Use character field to reference image file

    Thanks for the idea, John, but it does not solve my problem. I need to use a variable or lookup a field in a table as the image reference rather that directly indicating in the properties. See the attached image to understand the location I am trying to do this. Thanks to all.

    Howard

  4. #4
    VAR Dan Blank's Avatar
    Real Name
    Dan Blank
    Join Date
    Apr 2000
    Location
    Fort Worth, TX
    Posts
    995

    Default RE: Use character field to reference image file

    Hi Howard,

    Unless I am missing your question, why not use a button to open up a folder viewer to give the user a choice.

    Attached is a simple version of what I use all the time.

    Hope this helps.

    Dan

    Dan Blank Databases, Inc.

Similar Threads

  1. Bitmap, JPEG Image, or Image File Reference?
    By Elke in forum Alpha Five Version 6
    Replies: 4
    Last Post: 02-09-2005, 03:38 AM
  2. Checking contents of 'image file reference' field
    By Bill Walker in forum Alpha Five Version 6
    Replies: 5
    Last Post: 02-02-2005, 04:25 PM
  3. image reference file
    By martinwcole in forum Alpha Five Version 5
    Replies: 6
    Last Post: 02-11-2004, 05:56 PM
  4. Image file reference field problem on reports.
    By PhilD in forum Alpha Five Version 5
    Replies: 6
    Last Post: 12-23-2003, 06:52 AM
  5. Image File Reference
    By Gregory R. Zilliox in forum Alpha Five Version 5
    Replies: 1
    Last Post: 12-14-2003, 03:54 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
  •