rusty.hammond at cpiqpc.com
rusty.hammond at cpiqpc.com
Mon Nov 6 12:06:49 CST 2006
John,
Do they need to make changes to the report? If not I've solved this issue
by
by setting the report to read only on the network.
Something like the following:
Function ExportRpt(strRptName as String, strFileAndPath as string)
If Dir(strFileAndPath) <> "" Then
SetAttr strFileAndPath, vbNormal
Kill strFileAndPath
End If
DoCmd.OutputTo acOutputReport, strRptName, acFormatXLS, strFileAndPath
SetAttr strFileAndPath, vbReadOnly
End
HTH,
Rusty
-----Original Message-----
From: John Skolits [mailto:askolits at ot.com]
Sent: Monday, November 06, 2006 11:33 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Closing an open file
When running Access, I create reports every night, but inevitably, some user
has opened the file off the network and never closed it. I can't remove it
with KILL.
Any one have code for closing a file that may be open so I can then delete
it?
John
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
**********************************************************************
WARNING: All e-mail sent to and from this address will be received,
scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc.
corporate e-mail system and is subject to archival, monitoring or review
by, and/or disclosure to, someone other than the recipient.
**********************************************************************