Modules & VBA :: Temporarily Map A Drive / Copy A File Then Remove Mapped Drive

Aug 29, 2014

My workaround was to temporarily map the URL to a vacant drive letter on the local machine, then copy the file over, then drop the mapped drive again. A bit clunky but doesn't incorporate much of a delay and this download only has to happen once per day.

The good news is, the file download / copy now works every time. The bad news is that removing the temporarily mapped drive after the copy has taken place, doesn't and I can't figure out why.

Here are the functions I use to map / unmap the drive :

Code:

Option Compare Database
Option Explicit

Private Const RESOURCETYPE_ANY = &H0&
Private Const CONNECT_UPDATE_PROFILE = &H1&
Private Const RESOURCE_CONNECTED As Long = &H1&

[Code] .....

I have separate functions to check existing drive mappings on the local machine and thus determine an appropriate vacant letter to use for the temporary mapping - they work fine.

Unfortunately the UnMapDrive function returns False (even though I switch the active drive to C: and force the connection to be cancelled with the fForce flag) So the mapping always remains on the users profile.

I don't want to permanently map drives on the users' profiles, just briefly for the purposes of this daily file download.

View Replies


ADVERTISEMENT

Modules & VBA :: How To Hide Mapped Drive With Code

Nov 3, 2014

So I do map drive on this way and it is successful ...

Code:
Dim FSO As Object
Dim objFile As Object
Dim objFileS As Object
Dim WshNet As Object
persistent = false
set objNetwork = CreateObject("WScript.Network")

objNetwork.MapNetworkDrive "driveletter:", "serversharename", persistent, "username", "password"

But I need to have mapped drive hidden from the client users So I red that i might be possible if put $ after the share folder

Code:
objNetwork.MapNetworkDrive "driveletter:", "serversharename$", persistent, "username", "password
"
but it does not work.. the other way is to set values in win registry, but I don't like that way...

View 1 Replies View Related

Mapped Drive Converted To UNC Is Slower

Nov 23, 2005

I have my database connected to a network of ten computers. I recently switched my linked tables from a Mapped Network Drive to using the actual UNC path \computerfolderdatabase.mdb

My users have started to notice it takes longer for the database to connect in order to log in. Once they have established the connection, the data transfer speed seems to be normal.

Is this to be expected? Any suggestions to speed things up for login? Or is this the downside to using UNC?

~Scott

View 2 Replies View Related

Database Does Not Open Via Mapped Drive

Oct 30, 2007

As the thread title suggests, my problem is that I have a database that will not open via the mapped drive. There are other databases stored on this drive that open fine so it is only the one database that is causing me a headache.

Any suggestions as to why only this one database would be having this problem and any ideas on how to resolve it would be greatly appricated.

Thanks

View 3 Replies View Related

How Do I Link To Backend Db Without Using Mapped Drive Letter

May 16, 2005

Hi:

I have a front-end and back-end database.
Front end is at //fserv/database
back end is at //fserv/database/administration

I have sent front end path to users and they can bookmark it to find front-end. When I linked to the backend in the administration folder I had the path mapped to drive T:

Problem is the users do not have this same mapping to drive T: They may have other paths already mapped to that drive.

The users are getting the message:"t: est.mdb is not a valid path. Make sure the path name is spelled correctly and that you are connected to the server on which the file resides."

Is there anyway to link the the backend tables using just a path like:
//fserv/database/administration

Thanks in Advance!

Steve

View 3 Replies View Related

Linking A Table Using Server Name Instead Of Mapped Network Drive

May 20, 2013

I am attempting to link a table in one database to another database using the server name designation (ie.//2sxfprinff01Group) instead of the mapped network name (ie. G:). I tried relinking using the Access Link Manager. Right click on the linked table. But it does not let you edit the link.

Access 2007 does not allow this and reverts links to the G: drive. There are situations where the the IT department have set the mappings to this shared location as an H: for some of the employees. In those cases, the employee gets an error message telling them that Access cannot locate the G: drive.

An obvious solution is to get the employees remapped to the G: drive. However, one would think that MS would have allowed for mapping to the designated location and not an alias.

View 3 Replies View Related

Access DB Not Opening If Specific Drive Letter Not Mapped

Mar 25, 2015

I've inherited a few Access DB monstrosities. One of which had ODBC credentials hard coded in the MDE which I had to recently update due to some server updates. I found an unsplit version of the Access DB on a development drive (j:db...) and updated the credentials hard coded in VB and updated the linked tables from the J drive path (dev) to the K drive path (prod). I then split the DB and the MDE worked fine for me. I quickly found out that it only works fine because I had J mapped still. End users do not have the J drive mapped (development) only the K (production). Without the J drive mapped to the actual dev path the Access DB simply doesn't load. No errors.

I then tried to find any references to J in VB and fix those. At this point I can't seem to find anything else that could be referencing the J drive but still the DB will not open without J mapped.

View 3 Replies View Related

Modules & VBA :: Browse For A File On Shared Drive And Link It To Record

Feb 24, 2015

I have a form displaying records. I would like the user to be able to select a button, browse for a file on a shared drive and link it to that record.

I have been exploring hyperlinking, which works for the most part, although I need it to display the share name rather than the drive assignment for that user. Such as drive1folder rather than C:folder.

Hyperlinking also unfortunatly requires the user to right click on a field select edit hyperlink then browse.

View 7 Replies View Related

Copy From A Drive To A Folder

Feb 27, 2006

Hi.
I have been searching previous threads and the help file and got half way, but have got stuck.

I want to copy all files from a floppy disk to a drive on a directory on a server. I can check to make sure the directory exists and if not, can make it. All I want to do is copy all the files from the floppy disk drive (A drive) to the direcory I have just created.

I got this from the help in access:-

FileSystemObject.CopyFolder "c:mydocumentsletters*", "c: empfolder"

but can't get it to work......is this the way I want to go?

Can anyone help?

Thanks.

Frank.

View 3 Replies View Related

Link To A PDF File In Another Drive

Feb 8, 2006

What I have is a bunch of files located in another Drive (PDF). I would like to link to them by id number from access.

Is this possible?

View 4 Replies View Related

Is There Any Method To Synchronize Two Access File Which In Desktop And Network Drive

Aug 14, 2007

Here are some background . My company got a access file in a network drive.The data entry simply open the file in the network drive.But once the data has increased (~400mb) sudddendly,all process slow down. Like search , using report etc.Is there any method to imporive the situation?Some guys suggest me to copy the data file to the desktop and sync them.Can it it work?IF works,how to do that?

thanks gratefully for any ans

View 3 Replies View Related

Question On How To Grab An Excel File On The Local Hard Drive

Jun 15, 2006

Hello, I was needing some help coming up with the code to search the local hard drive and grab a file and then import it into an Access table. I'm trying to do this on a form if possible. If you know of another way, that would work. Any help would be appreciated. Thanks.

View 9 Replies View Related

Modules & VBA :: Getting A Drive Letter?

Aug 19, 2014

I have an MS Access database that sits in the users local area e.g. C:Users....

I have the following code which will open a user guide on a server shared by all users.

Code:
strFilename = GetUNCPath("T:") & "19_InformaticsInternal Offer Transfers" & "Utility User Guide.doc"

Users have different drive letters for the server name. In my case it's "T:" but for others it may be"S:".

Is there any code which would determine what drive letter each user has? The server name is

denasvf1acorpHR_GLOBAL_1HR_Shared_Service_Data

View 3 Replies View Related

Modules & VBA :: Map Drive On Server Which Is Password Protected

May 7, 2014

I need to map drive on server which is password protected..so i used this:

Code:
persistent = false
set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "driveletter:", "serversharename", persistent, "username", "password"

but I get an Error 424 'object required'
in this:
set objNetwork = WScript.CreateObject("WScript.Network")

some other method to map password protected drive

View 3 Replies View Related

Thumb Drive

Jul 8, 2005

Does anyone know if I could put the runtime and an mdb on a thumb drive and run it from anywhere? Or does install stuff have to happen... :confused:

View 1 Replies View Related

Shared Drive

Oct 23, 2007

Hello,

I have an exrternal shared drive "E:"where I put my be files (which are constantly accessed by users with fe's from different terminals). Everytime
I reboot the computer that I am working on (where the external drive is), I have to set up the permissions of the shared drive "E:" all over again, otherwise other computers have no access to E. Is there a way that I could
fix this and not having to set permissions every time I reboot my computer?
For some reason, the permissions are lost.

View 4 Replies View Related

DB On Network Drive?

Jan 3, 2008

I have a db on a network drive and the performance is terrible, it runs fine on my local machine. How can I make it run better? The db is only 2 megs so I figured it would be ok, but since my forms have numerous queries within them, performance stinks.

View 13 Replies View Related

Drive List

Jun 21, 2005

Hi,

Does anyone know if Access has a built-in control that allows users to scan the directory structure of their PC? Similar to the DriveListBox and DirListBox controls in VB6? If so, how might I get access to it?

Thanks

Davemere

View 4 Replies View Related

Drive Verification OnOpen

Oct 19, 2005

Is there a way to verify the drive that an FE is opening from and then close if it is not where is should be?

I have a frontend that gets copied to each users C: drive by a .bat file. However, some just don't care about rules and proceedures and continue to open the frontend on the network drive. Since they map their drive to a specific letter drive for the BE that is where they are opening the FE from.

Thanks
Rich

View 2 Replies View Related

How To Execute Query From C Drive ?

Sep 27, 2005

Can I keep my queries in the C drive and execute it against tables that are in the LAN network drive ? Right now the queries are also in the netowrk drive. So each time when I refresh the data into C drive, I have to import the queries too.

Is it possible to keep the queries in the C drive and execute against data in the netowrk ? Please let me know.

Thanks in advance.

View 9 Replies View Related

Different Paths For Shared Drive

Feb 2, 2006

Hello all:

I have the following code to retrieve doucments:

strPath = "G:CorpCustomer Files"

Application.FollowHyperlink strPath & "" & textbox1 & "-" & textbox2 & ".doc"

This works fine from my computer because the shared drive on my computer is saved on the G drive.

I tried using the code from a coworker's computer, but got an error because her shared drive is : "X:CorpCustomer Files"

Basically anyone can access the Corp server through any drive depends on how it was mapped.

How do I get around this so that it works from any computer as long as the user has the Corp share drive?

Thanks much.

View 5 Replies View Related

Max Users On A Network Drive

Oct 23, 2014

I was just wondering how many users Access would be able to handle on a split frontend and backend database? The backend will be on a network drive and the frontend will be installed on each workstation. My database is pretty simple with no relationships if that matters. Also using Win7 and some users will have Office 2010 and others will have 2013.

View 2 Replies View Related

Runtime Access97 On Thumb Drive?

Dec 2, 2005

does anyone know if it's possible to "install" the runtime version of access 97 (we do have developer's edition, so can distribute the run-time version) to a thumb drive so that it would run without having to install it on each computer that one was going to use the thumb drive on - is there any add'l software that would make this possible/ - the application is for figure skating clubs - with distribution of up to 1000 copies - the idea is to distribute them to member clubs and various officers could use the application and exchange up-to-date data by passing on the thumb drive - this also would hpefully avoid all installation problems with pc's having various versions of access already installed, etc. - thanks for any suggestions- jim

View 6 Replies View Related

Unique Hard Drive Serial

Dec 8, 2005

I have seen some API that gets the serial of the hard drive, but this information is not unique and changes when the volume is formated.
Does any one know of a way to return the orignal manufucture's information/serial which is unique(GUID) to the volume.
Any Idea will be highly appreciated.

View 6 Replies View Related

DB Security On A Shared Networked Drive

Jan 31, 2006

I've created a database on put it on a shared network drive. I have several people who will need to use this database but I dont want some of them to be able to edit the database in anyway.

Ive tried creating individual user accounts for the database but I don't think I'm grasping how the security works.

When on my machine I'm promted for a username and password but when on someone elses machine they can open up the database with full access.

How do i create individual user security accounts on a database I want to share on a network drive?

View 4 Replies View Related

Database On Network Drive Won't Open

Oct 24, 2006

I was using the database when there was a network error and I had to close it. When I tried to reopen it I got the error message: Record(s) cannot be read; no read permission on 'MSysAccessObjects'. I logged off the PC and logged back on various others, but keep getting the same message. Can anyone tell me if this is terminal or is there a way around it. I do have a backup, but it's a few days old and a lot of work will need re-entering' so any help would be appreciated!!

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved