Help: Changing database Location (path) for Sharing (1 Viewer)

TreadingWater

New member
Local time
Today, 07:41
Joined
Dec 29, 2014
Messages
4
For background:
In the past I have only done data input into Access databases that have already been created. They have been simple text fields only. I was hired on contract to finish data input for a database that serves to catalogue material resources. The database itself was supposed to have been completed by a former contractor but I'm discovering bits and pieces that weren't finished. I don't have any background in IT or coding.

So, this database eventually has to be shared in a "locked" format so that other entities can view our resources (like a catalogue) without changing them. My next step is to add images to each of the items being catalogued (there are about 100 images).
The former contractor began a table labeled "Pictures" in which there are 2 columns: PictureID and PicturePath, the latter being a path starting with C:\. The issue is, his picture paths include the hard drive name so that it looks like this:
C:\HardDrive\Pictures\PictureID.jpg
...at least from what I know, this is going to be an issue because I need the database and its images to be share-able on other computers. And I need to use relative paths to connect the images to the database so I'm not tremendously increasing the size of the database.
Correct me if my thinking is wrong at any part of this.

My first question is, does the location/path of the database need to be changed so it can be shared, and if so how do I do that?

Second question: I have all the images I will be using in a folder on my desktop; how do I save them in a "fixed subdirectory" of the database so that they get moved with it whenever it is sent out to another user?

Third question: If I change the database name as I'm working on it (I've been saving a new database each day, so that if I screw up something I can go back to the most recent working one) will that mess up my picture paths? If so, how do I avoid this?

I can't thank you enough for helping me out with this one! It's been a huge frustration trying to figure it out on my own.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:41
Joined
Aug 30, 2003
Messages
36,134
I'm unclear on whether by sharing you mean on a network or you'll be sending the db and pictures to users in unknown locations? Certainly either way the path needs to change. If on a network I'd have them on a server in a shared folder and use a UNC path:

\\ServerName\FolderName\PictureID.jpg

If in unknown but relative subfolder, you can store from the subfolder down:

\FolderName\PictureID.jpg

and use CurrentProject.Path in VBA code which should return the location of the db. In a test db I have open:

?currentproject.Path
C:\Users\pbaldy\Desktop\APdataB
 

TreadingWater

New member
Local time
Today, 07:41
Joined
Dec 29, 2014
Messages
4
Thank you for your suggestion. The database needs to be readable on any computer anywhere in the world, not just within the shared network. I had a short meeting with my supervisor and explained to him my plan, and he called over the IT specialist to discuss. He thinks we should do the images as attachments and then create a subtable on the page the image should be displayed.
My question, then, is this: Is it possible to create a subtable that will show an attached image without having to click on anything to open the attachment? Essentially, will it look similar to an embedded image but be an attached jpg?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:41
Joined
Aug 30, 2003
Messages
36,134
Not sure what they mean by attached. There is an attachment data type, but as you point out using it would bloat the size of the database. The good news is it would be self contained. If you store a path and keep the images outside the db, I believe you can use code to display images as the user navigates records (set the path of an image control).
 

TreadingWater

New member
Local time
Today, 07:41
Joined
Dec 29, 2014
Messages
4
Excellent, that is exactly what I wanted to hear! I brought up the file size issue but both the IT guy and my supervisor said it's more important to not have to worry about images getting separated. Guess you have to give them what they want! Thanks again for all the help.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:41
Joined
Aug 30, 2003
Messages
36,134
No problem! 100 pictures will probably not bloat it too badly, particularly if you're using a recent version of Access. Early versions had a tendency to bloat the db far out of proportion to the size of the attachment.
 

Users who are viewing this thread

Top Bottom