By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

Kill Statement

P: n/a
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile,
MyZipfile.zip.

Thanks!

Steve
Nov 12 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---
Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile, MyZipfile.zip.

Thanks!

Steve

Nov 12 '05 #2

P: n/a
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in message
news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in

MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the

zipfile,
MyZipfile.zip.

Thanks!

Steve


Nov 12 '05 #3

P: n/a
NO idea if this will make a difference, but try giving the mdb and zip files
different names, e.g., temp.mdb and MyOtherDatabase.mdb. Does that change
anything?
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---
Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile, MyZipfile.zip.

Thanks!

Steve

Nov 12 '05 #4

P: n/a
Bruce,

Thanks for responding!

Take a close look at my post, I already do this. The database file is named
MyOtherDatabase.mdb and when I zip it, I name the zip file, MyZipfile.zip. Then
in the Kill statement I explicitly name MyOtherDatabase.mdb to Kill.

Steve
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bk**********@gladiola.noc.ucla.edu...
NO idea if this will make a difference, but try giving the mdb and zip files
different names, e.g., temp.mdb and MyOtherDatabase.mdb. Does that change
anything?
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in

MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the

zipfile,
MyZipfile.zip.

Thanks!

Steve


Nov 12 '05 #5

P: n/a
The kill is Killing before the Create Zip has finished.

(david)

"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and MyZipfile.zip are both there. If I run the code as shown in my post (with the Kill statement) neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in message news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in

MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the

zipfile,
MyZipfile.zip.

Thanks!

Steve



Nov 12 '05 #6

P: n/a
Hi,
Not sure how you're perfoming the zip, but if it's using Shell
and the zip command line tool, unless your using the ShellAndWait
code, that kill statement will execute immediately and presto no
more file to zip.

--
HTH
Dan Artuso, Access MVP
"Steve" <sa****@penn.com> wrote in message news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile,
MyZipfile.zip.

Thanks!

Steve

Nov 12 '05 #7

P: n/a
David,

Thanks for responding!

That makes sense! Do you have any suggestions of what to add to the code to
overcome that problem?

Steve
"david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
news:OD**************@TK2MSFTNGP11.phx.gbl...
The kill is Killing before the Create Zip has finished.

(david)

"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and

MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill

statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in

message
news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
> AccessXP in Access2000 mode
>
> I have the following code outline in a standard module in
MyDatabase.mdb ---
>
> Use CreateDatabase to create MyOtherDatabase.mdb
> Use two make table queries to create two tables in MyOtherDatabase.mdb
> Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
> Kill "MyOtherDatabase.mdb" 'this is the actual line of code
>
> Does anyone have any ideas on why the Kill statement also deletes the
zipfile,
> MyZipfile.zip.
>
> Thanks!
>
> Steve
>
>



Nov 12 '05 #8

P: n/a
Windoze works asychronously, so you start the process which makes a zip
file, but before zip geta around to actually creating and saving the zip
file, your next process comes in and deletes the .mdb which zip is supposed
to be working on....

You have to use a Wait for Process to end API call to ensure that the zip is
finished before doing the Kill.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and MyZipfile.zip are both there. If I run the code as shown in my post (with the Kill statement) neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in message news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in

MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the

zipfile,
MyZipfile.zip.

Thanks!

Steve



Nov 12 '05 #9

P: n/a
Yes, I'm using Shell and the zip command line tool. I found the Shell and Wait
code at mvps.org/access website and will try that.

Thanks for the help, Dan!!
"Dan Artuso" <da*****@NoSpampagepearls.com> wrote in message
news:ud*************@TK2MSFTNGP11.phx.gbl...
Hi,
Not sure how you're perfoming the zip, but if it's using Shell
and the zip command line tool, unless your using the ShellAndWait
code, that kill statement will execute immediately and presto no
more file to zip.

--
HTH
Dan Artuso, Access MVP
"Steve" <sa****@penn.com> wrote in message

news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile, MyZipfile.zip.

Thanks!

Steve




Nov 12 '05 #10

P: n/a

"Adrian Jansen" <qq*@noqqwhere.com> wrote in message
news:3f********@duster.adelaide.on.net...
Windoze works asychronously, so you start the process which makes a zip
file, but before zip geta around to actually creating and saving the zip
file, your next process comes in and deletes the .mdb which zip is supposed
to be working on....

You have to use a Wait for Process to end API call to ensure that the zip is
finished before doing the Kill.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and

MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill

statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in

message
news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
> AccessXP in Access2000 mode
>
> I have the following code outline in a standard module in
MyDatabase.mdb ---
>
> Use CreateDatabase to create MyOtherDatabase.mdb
> Use two make table queries to create two tables in MyOtherDatabase.mdb
> Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
> Kill "MyOtherDatabase.mdb" 'this is the actual line of code
>
> Does anyone have any ideas on why the Kill statement also deletes the
zipfile,
> MyZipfile.zip.
>
> Thanks!
>
> Steve
>
>



Nov 12 '05 #11

P: n/a
Thanks for responding, Adrian!!

You're confirming what another poster said.

Steve
"Adrian Jansen" <qq*@noqqwhere.com> wrote in message
news:3f********@duster.adelaide.on.net...
Windoze works asychronously, so you start the process which makes a zip
file, but before zip geta around to actually creating and saving the zip
file, your next process comes in and deletes the .mdb which zip is supposed
to be working on....

You have to use a Wait for Process to end API call to ensure that the zip is
finished before doing the Kill.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and

MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill

statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in

message
news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
> AccessXP in Access2000 mode
>
> I have the following code outline in a standard module in
MyDatabase.mdb ---
>
> Use CreateDatabase to create MyOtherDatabase.mdb
> Use two make table queries to create two tables in MyOtherDatabase.mdb
> Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
> Kill "MyOtherDatabase.mdb" 'this is the actual line of code
>
> Does anyone have any ideas on why the Kill statement also deletes the
zipfile,
> MyZipfile.zip.
>
> Thanks!
>
> Steve
>
>



Nov 12 '05 #12

P: n/a
You will have to look at the code for creating the zip:
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
(david)

"Steve" <sa****@penn.com> wrote in message
news:CS******************@newsread1.news.atl.earth link.net... David,

Thanks for responding!

That makes sense! Do you have any suggestions of what to add to the code to overcome that problem?

Steve
"david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
news:OD**************@TK2MSFTNGP11.phx.gbl...
The kill is Killing before the Create Zip has finished.

(david)

"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and

MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill

statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in

message
news:3f********@news.microsoft.com...
> That is not possible.
>
> Most likely the zip failed, thus the file was never created in the first > place.
>
>
> --
> MichKa [MS]
>
> This posting is provided "AS IS" with
> no warranties, and confers no rights.
>
>
> "Steve" <sa****@penn.com> wrote in message
> news:ci******************@newsread1.news.atl.earth link.net...
> > AccessXP in Access2000 mode
> >
> > I have the following code outline in a standard module in
> MyDatabase.mdb ---
> >
> > Use CreateDatabase to create MyOtherDatabase.mdb
> > Use two make table queries to create two tables in MyOtherDatabase.mdb > > Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
> > Kill "MyOtherDatabase.mdb" 'this is the actual line of code
> >
> > Does anyone have any ideas on why the Kill statement also deletes the > zipfile,
> > MyZipfile.zip.
> >
> > Thanks!
> >
> > Steve
> >
> >
>
>



Nov 12 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.