Results 1 to 4 of 4
  1. #1
    fiamma68 is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    3

    Deleting a file

    Come posso eliminare un file, il cui percorso è registrato è in un record di una tabella.


    Vorrei creare un bottone che richieda la referenza univoca del record, catturi il valore del campo "immagine" (file da eliminare), quindi proceda con il comando kill associato al percorso specifico.

    Grazie

    How do I delete a file, whose location is registered in a record in a table. I would like to create a button that requires a unique reference for the record, capture the value of the field "image" (file to be deleted), then proceed with the kill command associated with the specific location. Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    You should be able to use the Kill command along with a reference to the control on the form containing the path:

    Kill Me.TextboxName

    Ciao
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    fiamma68 is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    3
    Ho una maschera chiamata 'ricerca', con una casella di testo 'txtImageName' dove ho il percorso del file da eliminare (es. i:\data\123.jpg). Ho creato un bottone associato ad una macro che lancia il seguente codice: Kill Me.txtImageName.
    ma quando lancio la macro/bottone mi restituisce l'errore:
    " L'oggetto non contiene l'oggetto 'Kill' " ed interrompe la macro.
    Dove sto sbagliando ?

    Grazie


    I have a form called 'research', with a text box 'txtImageName' where I want to delete the file path (ex.: \ data \ 123.jpg). I created a button that launches a macro associated with the following code: Kill Me.txtImageName.
    but when I launch the macro / button returns me the error:
    "The object does not contain the object 'Kill'" and stops the macro.
    Where am I doing wrong?

    Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    I don't use macros, but to my knowledge they don't have the equivalent of the Kill command. What I posted was VBA code.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. deleting records
    By radicalrik in forum Queries
    Replies: 2
    Last Post: 07-14-2010, 03:10 PM
  2. Deleting certain data
    By swindmiller in forum Queries
    Replies: 3
    Last Post: 02-17-2010, 10:39 PM
  3. Deleting Duplicates
    By TundraMonkey in forum Queries
    Replies: 4
    Last Post: 09-08-2009, 07:13 AM
  4. Replies: 2
    Last Post: 01-14-2008, 12:15 PM
  5. Deleting Spaces
    By grgerhard in forum Import/Export Data
    Replies: 2
    Last Post: 04-30-2006, 06:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums