Alpha Video Training
Results 1 to 5 of 5

Thread: Delete Image Filename

  1. #1
    Member
    Real Name
    Robin James
    Join Date
    May 2000
    Location
    Henley on Thames, UK
    Posts
    125

    Default Delete Image Filename

    Is there an Xbasic way to delete the filename in an "Image File Reference" field?

    ie instead of right clicking the Image Reference Field, and clicking Delete Image Filename.

    Robin

  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: Delete Image Filename

    What is the context?

    On a form based on a table/parent table you could have a button with the code


    parentform.commit()
    tbl = table.current()
    tbl.change_begin()
    tbl.imagefilereferencefieldname= image_filename_encode("")
    tbl.change_end(.t.)
    parentform.resynch()

    or

    parentform.commit()
    tbl = table.current()
    fld = tbl.field_get("imagefilereferencefieldname")
    tbl.change_begin()
    fld.blank_put()
    tbl.change_end(.t.)
    parentform.resynch()
    There can be only one.

  3. #3
    Member
    Real Name
    Robin James
    Join Date
    May 2000
    Location
    Henley on Thames, UK
    Posts
    125

    Default Re: Delete Image Filename

    Yes Stan

    The context is a table/child form (a one to one relationship). The first code gives error message attached.
    The child table has 2 fields: "IDnumber" (numeric for link) and "Picture" (image file reference).

    Your first code example works fine, as you said, for a table/parent form.
    How should the code be changed for the table/child form in my set?

    Thanks for any advice.
    Robin

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

    Default Re: Delete Image Filename

    tbl = table.current(#)

    Where # is the vertical position in the set diagram when viewed in the set editor.
    There can be only one.

  5. #5
    Member
    Real Name
    Robin James
    Join Date
    May 2000
    Location
    Henley on Thames, UK
    Posts
    125

    Default Re: Delete Image Filename

    Wow. So quick Stan!

    Many thanks indeed.
    Robin

Similar Threads

  1. Delete Image
    By harbo in forum Alpha Five Version 8
    Replies: 0
    Last Post: 06-03-2007, 12:09 PM
  2. Cannot delete a report with "Invalid structured store image"
    By Rolin in forum Alpha Five Version 8
    Replies: 0
    Last Post: 02-19-2007, 05:53 AM
  3. Name to filename?
    By Richard Froncek in forum Alpha Five Version 7
    Replies: 9
    Last Post: 09-22-2006, 02:09 PM
  4. Image File reference filename dialog box
    By Graham Wickens in forum Alpha Five Version 5
    Replies: 0
    Last Post: 01-05-2004, 04:09 PM
  5. Filename dialog
    By mronck in forum Alpha Five Version 5
    Replies: 15
    Last Post: 11-27-2003, 04:16 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
  •