delete files

  • Thread starter PANOS via AccessMonster.com
  • Start date
P

PANOS via AccessMonster.com

Good morning and thks for your help,

1. Have on acces Qouestion with the following

CODE
02304
02305
02306
Code is the item No
2. I have folder one my pc and i want to delete that foto (name of photo =
code)
 
T

Tom van Stiphout

On Thu, 20 May 2010 11:44:30 GMT, "PANOS via AccessMonster.com"

You would have to write some VBA code to loop over the data, and
delete each file:
dim rs as dao.recordset
const MY_FOLDER as String = "c:\myfolder\" 'NOTE: must have trailing
backslash
set rs=currentdb.openrecordset("select [item No] from [Qouestion]
'TODO: Adjust these object names if not correct
while not rs.eof
Kill MY_FOLDER & rs(0)
rs.movenext
wend
rs.close

-Tom.
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top