[AccessD] A Matter of Killing

Rocky Smolin rockysmolin at bchacc.com
Sun Aug 16 16:26:46 CDT 2009


Stuart:

In this case it is very unlikely.  They're exporting a bill of materials so
the file will only be opened and worked on by the user in Excel after the
export is done.  It is possible that two users could try to export the same
BOM at the same time.  But the likelihood seems vanishingly small.

I could get around even that possibility by changing gstrBackEndPath to
gstrFrontEndPath - another handy global I keep around for just such
application.  I'll have to ask the user what they prefer. User's in Bahrain,
BTW - another 'remote' location.

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Sunday, August 16, 2009 2:08 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] A Matter of Killing

That's what I frequently use -  but only where I am sure that the user will
be able to delete the old file. 

If for some reason the file can't be deleted - in use, set as ReadOnly or
the user doesn't have suitable permissions on the file or directory,  you
may be still left with old file and not realise it.

Where there are these possibilities, you need to set up a full error trap
and only Resume Next if the file doesn't exist.  If you get any other error
you need to advise the user accordingly.

In your case you are using  gstrBackEndPath.  Could two people try to work
with  the same file at the same time?


-- 
Stuart


On 16 Aug 2009 at 6:56, Rocky Smolin wrote:



> Dear List:
> 
> I am exporting a bill of materials to a spreadsheet from an access
database.
> The file name on the spreadsheet is the part number the user selects plus
> some other stuff.
> 
> Before I create it I issue a Kill:
> 
> Kill gstrBackEndPath & Forms!frmBFGExportBOM!txtAssemblyPartNumber & " -
BOM
> Export.XLS"
> 
> If the file is not there it generates an error of course, file not found.
> 
> Is there anything wrong with the simple workaround:
> 
> On Error Resume Next
> Kill gstrBackEndPath & Forms!frmBFGExportBOM!txtAssemblyPartNumber & " -
BOM
> Export.XLS"
> On Error GoTo 0
> 
> 
> MTIA,
> 
> Rocky Smolin
> 
> Beach Access Software
> 
> 858-259-4334
> 
> www.e-z-mrp.com <http://www.e-z-mrp.com/> 
> 
> www.bchacc.com <http://www.bchacc.com/> 
> 
>  
> 
>  
> 
> 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list