A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

delete files



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2010, 12:44 PM posted to microsoft.public.access.queries
PANOS via AccessMonster.com
external usenet poster
 
Posts: 1
Default delete files

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)

--
Message posted via http://www.accessmonster.com

  #2  
Old May 20th, 2010, 02:47 PM posted to microsoft.public.access.queries
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default delete files

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

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


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)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.