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 Replies


ADVERTISEMENT

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

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 :: 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 11 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

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

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

Storing The First Letter Of First Name, First Letter Of Last Name And Data Of Birth

Feb 19, 2006

Hi,

I'm designing a database in which the primary key is a combination of the first letter of first name, the first letter of last name and the date of birth.

How can I do that?

Regards,
CS

View 8 Replies View Related

Modules & VBA :: Use Only First Letter From A Word

Feb 27, 2015

I'm creating a folder with values from some fields. It all goes OK, but, the only thing is that the name of the folder could get to long.

We use words like "Prototype Model" "Prototype Review" Next Date Review" "Next Prototype Review"

How could I end up with only the first letter from each word like "PM" "PR" "NDR" "NPR" from a field called Type_Review ?

View 14 Replies View Related

Modules & VBA :: Appropriate Watermark On Each Letter Of Printspool

Nov 29, 2013

I am using Excel as a frontend and Access as a backend. Now in the main form the user types in all the information about a customer and press Save. Suppose he stores 10 customers details so I am using PrintSpool Number . For those 10 records the printspool number will be save so that when the user press Print button then all those 10 Word document letters will get printed off. This works absolutely fine. Now I want to do the following checks in the code while printing:

It will make it easier on the watermark issue as it changes the below

First check
IF AXAFRIENDS = FLC use NO WATERMARK and END conditional (do not do second or third check)
IF FALSE move to second check

Second check
IF Team = LTC use LTC and END conditional (do not do third check)
IF Team = WINTERTHUR use WLUKCAP4 and END conditional (do not do third check)
IF FALSE move to third check

Third check
IF AXAFRIENDS = FRIENDS use PAP107 and END conditionals
IF AXAFRIENDS = DM use PAPSLD and END conditionals

AXAFRIENDS is the name of the field and the above conditions will result in different watermarks for each customer letter. My code doesn't work as required. Suppose 10 records in Access table have same PrintSpool number (Textbox1) ,then it should check for each record the AXAFRIENDS field value and display appropriate watermark during PRINT.

Code:
Private Sub CommandButton3_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim r As Long
Set cn = New ADODB.Connection

[Code] .....

View 4 Replies View Related

Modules & VBA :: How To Determine FlashDrive Letter

Apr 27, 2015

Is there anyway to determine the drive letter of a flashdrive inserted into a PC ? I have a backup routine that backs up a MS Access database to a flashdrive. I need to determine the flashdrive letter.

View 9 Replies View Related

Modules & VBA :: Fetch Initials (First And Last Letter) Of Username

Dec 24, 2013

How can we store the first and last letter of the username using vba.

E.g. my name is "Daniel Rawlings" then it should display "DR".

View 1 Replies View Related

Modules & VBA :: Creating Mail Merge Letter

Aug 20, 2013

I basically have a form which the record source is either from a table or query and all I would like to do is to have a button which when pressed will open up a previously created word template and insert all relevant fields into the template. First Name, Last Name, Address etc.

View 1 Replies View Related

Modules & VBA :: Insert Date If Letter T Is Pressed

Jul 17, 2015

On a form I have a textbox with a data type of Date/Time. If the user has the cursor in that text box and types the letter "t", I want to automatically insert today's date. I also want them to have the option of manually typing in a date, i.e. 05/12/2001 or use the Date Picker "calendar" item. This is using Access 2010.

View 3 Replies View Related

Letter By Letter Search Through A Table

Aug 21, 2005

ok here is what i want.. imagine a search box, just an empty text box that allows the user to type things into it...

there will be a simple table from the database behind it, here is the typical structure of a record

<Country>Poland
<Price1>60
<Price2>85
<Price3>95

in this table there will be say a 1000 of these records...
my user is going to have to quickly search through these records while on the phone to a customer, and quote one of the relevant prices associated with that country

what i would like is this most convenient system..
as the user types in the letter 'P' just below all the records with countries that begin with 'P' are displayed (with a scroll down arrow if needed)..as well as the 3 relevant prices with that record

if they then type an 'O' into the box (which will now hold 'Po') all the records with countries beginin with 'Po' will be displayed (eg Poland)

if they delete the 'o'. once again the displayed records below the box will return to just the countries begginin with 'p'

all that is needed is for the records to be displayed, thats it.. but the adding and deleting of the letters within the text search box will need to instantly manipulate this list..

i have posted on other forums, and have been told this can be acheived in access, is it hard?

View 9 Replies View Related

Modules & VBA :: Text Box Searches With Every Added Letter To String

Sep 16, 2014

I'm trying to add a search function the searches with ever letter I add to the string in the search box. if the string is not in the recordset then vbred the textbox.

Here's my code:

Private Sub txtGroupNr_KeyPress(KeyAscii As Integer)
Set RstRecSet = Nothing
Set db = CurrentDb
On Error Resume Next
If IsNull(txtGroupNr) Or txtGroupNr = "" Then
' MsgBox "Please enter a Group Number to use as the search criteria", _

[Code] ....

View 4 Replies View Related

Modules & VBA :: DLookup To Return A Value Starting With Specific Letter

Feb 25, 2014

I am trying to use a DLookup to search to find what block goes into the production of an item.

In a table called "dbo_vw_MCE_job_with_materials", each item contains a list of the parts which go into its production in a column titled "Expr1". However there are always more than one parts to this, with varying names.

What I am trying to do is to use a Dlookup to only return the first value which starts with B (as the block number is always the only part on the list which begins with B).

At the moment my DLookup would look ike this:

Code:
MixTypeTxt = DLookup("Expr1", "dbo_vw_MCE_job_with_materials", "[item] ='" & Forms![Theta Input]![ItemNumbertxt] & "'")

However I think as the item column contains the same item number in 8 columns, with different values in the Expr1 column, Dlookup only returns the top value "A-CF0057" (which is irrelevant as far as I am concered) - whereas I am hoping it will be able to pull the "B1499" value from the column as it is the only one starting with a B

Is there anyway to specify which value the dlookup function would return, or is there any way to apply some sort of permanent filter on my table?

View 1 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

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

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







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