Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

how do i delete a text file using ACCESS VBA code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Navo21 - 22 Feb 2007 10:09 GMT
I am willing to delete a text file after i use it by using VBA code while my
form is running
stumac - 22 Feb 2007 10:26 GMT
to delete a file using VBA:
Kill "c:\yourfolder\yourfile.txt"

You may want to put some kind of if statement in to make sure the file
exists first.

Hth

Stu

> I am willing to delete a text file after i use it by using VBA code while my
> form is running
Jamie Collins - 22 Feb 2007 15:31 GMT
> I am willing to delete a text file after i use it by using VBA code while my
> form is running

Tongue slightly in cheek:

CurrentProject.Connection.Execute _
 "DROP TABLE [TEXT;DATABASE=C:\FolderNameHere\;].FileNameHere#txt;"

Jamie.

--
John W. Vinson - 22 Feb 2007 18:34 GMT
>> I am willing to delete a text file after i use it by using VBA code while my
>> form is running
[quoted text clipped - 5 lines]
>
>Jamie.

<g>

Yeah, that'd work.

Sort of like using a helicoptor rotor as a hedge trimmer though...

            John W. Vinson [MVP]
John Nurick - 22 Feb 2007 20:59 GMT
>Sort of like using a helicoptor rotor as a hedge trimmer though...

Flying a helicopter inverted: way cool!

--
John Nurick [Microsoft Access MVP]

Please respond in the newsgroup and not by email.
John W. Vinson - 23 Feb 2007 06:50 GMT
>>Sort of like using a helicoptor rotor as a hedge trimmer though...
>
>Flying a helicopter inverted: way cool!

Or just low to the ground... with a TALL hedge...

            John W. Vinson [MVP]
Jamie Collins - 26 Feb 2007 08:37 GMT
On Feb 22, 6:34 pm, John W. Vinson
<jvinson@STOP_SPAM.WysardOfInfo.com> wrote:
> >Tongue slightly in cheek:
>
[quoted text clipped - 6 lines]
>
> Sort of like using a helicoptor rotor as a hedge trimmer though...

I figured the OP had in the title emphasized ACCESS VBA, as distinct
from vanilla VBA, so I thought, "What's the most _*ACCESS*_ way of
deleting a file...?" ;-)

Jamie.

--
John W. Vinson - 26 Feb 2007 17:33 GMT
>I figured the OP had in the title emphasized ACCESS VBA, as distinct
>from vanilla VBA, so I thought, "What's the most _*ACCESS*_ way of
>deleting a file...?" ;-)

Nah. None of us Access rubes ever use DDL; "DROP TABLE" is a foreign
language! :-{)

            John W. Vinson [MVP]
Jamie Collins - 27 Feb 2007 08:20 GMT
On Feb 26, 5:33 pm, John W. Vinson
<jvinson@STOP_SPAM.WysardOfInfo.com> wrote:
> I thought, "What's the most _*ACCESS*_ way of
> >deleting a file...?" ;-)
>
> Nah. None of us Access rubes ever use DDL; "DROP TABLE" is a foreign
> language! :-{)

LOL!

Jamie.

--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.