Question Storing images in a different location

josephbupe

Registered User.
Local time
Tomorrow, 00:42
Joined
Jan 31, 2008
Messages
247
Hi,

I found a sample of a database that stores images in a sub folder located within the same directory as the mdb project file. The code is as follows:

Code:
'setup new file name and appropriate DB subfolder
          relativePath = "\Persons_Images\"
          dbPath = Application.CurrentProject.Path

I would like to modify the code above to store images somewhere else and not in the subfolder.

joseph
 
Last edited:
Try:
Code:
Function GetPictureDir() As String
    GetPictureDir = "X:\xxx\xxx\"
End Function

I actually store the image location on the main form and use:

Code:
GetPictureDir = Forms![Menu]![Image Directory]

Simon
 
Hi Simon,

Thank you, I will try your solution.

How about your second option, do you view them in a treeview?

Code:
I actually store the image location on the main form and use:

GetPictureDir = Forms![Menu]![Image Directory]

joseph
 
Joseph yes you can get to view the files using the File Dialog Box however this requires code that I would expect is beyond your ability to understand at present. So trying to get it working at the moment would be unlikely to be successful.

I would concentrate getting the above working and then once you have that sorted gradually look towards improving your understanding of functions and code.
 
RecordID = Image File Name [+ Extension] = RecordID so that the image correlates to each record.

Simon
 

Users who are viewing this thread

Back
Top Bottom