linked field in same directory

R

Randy

I am fairly new to access so maybe this is a simple
question. I have my tables in one access database and my
queries and such in another. both files are in the same
folder on my usb flash card. I am creating the database
and work on it in many places and on many different
computers throughout the day. Every time I change
computers if the drive letter is different then the linked
tables dont work anymore. Is there a way to just make the
linked table path say just the local directory or do you
have to have the drive letter in the path all the time? I
would like it much like the HTML code of just typing "./"
so when I use it different places I wont have to relink
all the tables. thanks in advance!!!!!
 
J

John Vinson

I am fairly new to access so maybe this is a simple
question. I have my tables in one access database and my
queries and such in another. both files are in the same
folder on my usb flash card. I am creating the database
and work on it in many places and on many different
computers throughout the day. Every time I change
computers if the drive letter is different then the linked
tables dont work anymore. Is there a way to just make the
linked table path say just the local directory or do you
have to have the drive letter in the path all the time? I
would like it much like the HTML code of just typing "./"
so when I use it different places I wont have to relink
all the tables. thanks in advance!!!!!

If you navigate to the backend via Network Neighborhood it will use
the \\Server\path syntax... but I fear that's going to be different on
every machine as well, since it's a demountable device!

Can you assign a late drive letter - U or V or the like - to the usb
drive? or are you stuck with a system required drive letter?
 
R

Randy

First subject was suppose to be linked table not linked
field, but anyway...
I am stuck with the drive letter, I am a student and work
on the Dbase on computers all over campus throughout the
day so its pretty random. My real concern is when I
finish the project and give it to my management team, they
will be using it on a few different computers(every
database being independently operated, they wont be
connected) and I have no way of knowing what drives they
will be putting my databases on. Its a project that can
really make me look good with my company so i want to be
as trouble free as possible!

Randy
-----Original Message-----
 
J

John Vinson

First subject was suppose to be linked table not linked
field, but anyway...
I am stuck with the drive letter

About all I can suggest is that you get some good relinking software
(for instance from http://www.granite.ab.ca/access) and adapt it to
prompt for the drive letter of the USB port. It's a tough problem!
 
T

Tim Ferguson

both files are in the same
folder on my usb flash card. I am creating the database
and work on it in many places and on many different
computers throughout the day. Every time I change
computers if the drive letter is different then the linked
tables dont work anymore.

You can get the drive for the current database with the CurrentDB().Path,
so the drive will be

strDrive = Left$(CurrentDB().Path,1)

but actually you can get the whole directory path in one go by using the
Dir function. This only returns the file name, so you can chop that off the
end of the whole path and get left only with the drive:\directory\ string.
Vis:-

' use a variable for shorthand
strMDB = CurrentDB().Path

' chop off the right hand characters
strDirectory = Left$(strMDB, Len(strMDB)-Len(Dir$(strMDB)))

You can then plug strDirectory straight into the relinking routine.

Hope that helps


Tim F
 
A

Adrian Jansen

Good advice from other posters.

One thing you might want to think carefully about though. Flash cards have
a limited number of write cycles, usually around 1 million or so, but it
varies, and is not usually advertised or specified. Sounds a lot, but
programs like Access do a write virtually every time you change a record, or
do almost anything to the open data. It would be fairly easy to quickly
exceed the write limit, and then your card stops working - permanently.

Personally I would copy the files from the card to your current workstation,
do your Access session there, then copy them back to the card only at the
end of the session. Maybe when you work this way, some of the problems with
relinking tables may become easier.

Keep a current backup somewhere permanent !

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top