rosalyn.clarke at barclays.com
rosalyn.clarke at barclays.com
Thu May 8 11:24:44 CDT 2008
Yup, impossible! This is something I'd never heard of & I'll try & squirrel away the info against future need. But I think that as JC says it won't work if H:\ is mapped to somewhere else? Thanks for the tip Roz -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 08 May 2008 12:37 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Drive mappings & global constants Hi Roz Seems impossible to carry out over night ... But an interim solution could be to use the forgotten gem SUBST, a DOS command to virtualize a drive letter. Call it from VBA like this: Call CreateVirtualDriveH given you create the sub: Public Sub CreateVirtualDriveH() ' Specify new path which holds stuff of previous drive H:. Const cstrNewPath As String = "s:\" Shell "subst h: " & cstrNewPath & "", vbHide End Sub /gustav >>> rosalyn.clarke at barclays.com 08-05-2008 12:56 >>> Dear List I have just been asked to resolve something, in zero time as usual, and I'm sure there should be an elegant solution I just can't think of it. There is a team that has 100+ Access databases, Excel spreadsheets and Word templates that contain dependencies on a particular network drive that is currently mapped to 'h:\'. In a few weeks time they will no longer be able to use 'h:\' and will be given a new drive mapping. At some point shortly after that, the server will be changed too, so the current DNS path will no longer be valid either. I don't know -and nobody will say for definite - what the new mapping & new DNS path will be. These files are critical and the business insists on no more than 24 hours downtime. The dependencies include import/export routines, linked tables & linked files. What I would like to do is run a giant F&R on the code modules and replace the root drives with a constant, and then make the constant available so that ALL the applications use the constant. Then they can muck about with drive mappings etc. to their heart's content and I won't have to come back to the South coast and stay up all night changing code. Any tips or ideas for making this work? Is it possible? I have code for updating the code modules that should almost work but I've no idea how to expose a constant across multiple apps. TIA Roz -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com This e-mail and any attachments are confidential and intended solely for the addressee and may also be privileged or exempt from disclosure under applicable law. If you are not the addressee, or have received this e-mail in error, please notify the sender immediately, delete it from your system and do not copy, disclose or otherwise act upon any part of this e-mail or its attachments. Internet communications are not guaranteed to be secure or virus-free. The Barclays Group does not accept responsibility for any loss arising from unauthorised access to, or interference with, any Internet communications by any third party, or from the transmission of any viruses. Replies to this e-mail may be monitored by the Barclays Group for operational or business reasons. Any opinion or other information in this e-mail or its attachments that does not relate to the business of the Barclays Group is personal to the sender and is not given or endorsed by the Barclays Group. Barclays Bank PLC.Registered in England and Wales (registered no. 1026167). Registered Office: 1 Churchill Place, London, E14 5HP, United Kingdom. Barclays Bank PLC is authorised and regulated by the Financial Services Authority.