If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Picture database design
I am working on a database to store information about photographs and want to
include the actual photo as part of the information stored for forms and reports. I have read several forum threads and the article "Use images in your Access forms, reports, and controls" http://office.microsoft.com/en-us/as...spx?mode=print The photographs are stored on multiple hard drives including external drives that might not be available at all times. Since the actual photograph might not be available I thought I would create low quality, but small files of all the photos and either store them in the database as .bmp files or in a sub-directory that the database could access. I have had problems with both approaches. On page 5, the article indicates that it should be possible to store .bmp files in a table. However, I get the word "Package" rather than 'Bitmap Image" and the forms display a small icon plus the file name. The article says that there are problems with other formats but that .bmp should work. What am I doing wrong? The other approach I tried was small .jpb images stored in a sub-directory. On the bottom of page 5, the article says that relative paths should work. I like the idea of relative paths because moving external drives makes an absolute location risky. I can get a complete path to work and I can get just a filename to work if the image is in the same folder as the database. However, if the images are in a subfolder to the Access database folder I can't get it to work with a relative path. Here is an example: If the database is stored in: C:\My Documents\PhotoDatabase and there is a subfolder with the path C:\My Documents\PhotoDatabase\Photos I can put the pictures in C:\My Documents\PhotoDatabase and open the image with the filename only. Or, I can put images in C:\My Documents\PhotoDatabase\Photos and call them with the complete path. However, if I try to use a shortcut like this: Photos\filename.jpg it doesn't work. Am I doing something wrong or did I misread the artcile? Thank you for your help. David |
#2
|
|||
|
|||
Picture database design
You can always find the folder where the database currently is by using
this: pathname = CurrentProject.Path Therefore, you can set the path to the your pictures with this: Me.ImgStock.Picture = pathname & "\" & PictureNameVariable This way, no matter where the database is, as long as the pictures are in a subfolder, it will find them. On my website (www.rogersaccesslibrary.com), is a small Access database sample called "Pictures.mdb" which illustrates how to do this. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L "4110" wrote in message ... I am working on a database to store information about photographs and want to include the actual photo as part of the information stored for forms and reports. I have read several forum threads and the article "Use images in your Access forms, reports, and controls" http://office.microsoft.com/en-us/as...spx?mode=print The photographs are stored on multiple hard drives including external drives that might not be available at all times. Since the actual photograph might not be available I thought I would create low quality, but small files of all the photos and either store them in the database as .bmp files or in a sub-directory that the database could access. I have had problems with both approaches. On page 5, the article indicates that it should be possible to store .bmp files in a table. However, I get the word "Package" rather than 'Bitmap Image" and the forms display a small icon plus the file name. The article says that there are problems with other formats but that .bmp should work. What am I doing wrong? The other approach I tried was small .jpb images stored in a sub-directory. On the bottom of page 5, the article says that relative paths should work. I like the idea of relative paths because moving external drives makes an absolute location risky. I can get a complete path to work and I can get just a filename to work if the image is in the same folder as the database. However, if the images are in a subfolder to the Access database folder I can't get it to work with a relative path. Here is an example: If the database is stored in: C:\My Documents\PhotoDatabase and there is a subfolder with the path C:\My Documents\PhotoDatabase\Photos I can put the pictures in C:\My Documents\PhotoDatabase and open the image with the filename only. Or, I can put images in C:\My Documents\PhotoDatabase\Photos and call them with the complete path. However, if I try to use a shortcut like this: Photos\filename.jpg it doesn't work. Am I doing something wrong or did I misread the artcile? Thank you for your help. David |
#3
|
|||
|
|||
Picture database design
Thanks Roger.
David "Roger Carlson" wrote: You can always find the folder where the database currently is by using this: pathname = CurrentProject.Path Therefore, you can set the path to the your pictures with this: Me.ImgStock.Picture = pathname & "\" & PictureNameVariable This way, no matter where the database is, as long as the pictures are in a subfolder, it will find them. On my website (www.rogersaccesslibrary.com), is a small Access database sample called "Pictures.mdb" which illustrates how to do this. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L "4110" wrote in message ... I am working on a database to store information about photographs and want to include the actual photo as part of the information stored for forms and reports. I have read several forum threads and the article "Use images in your Access forms, reports, and controls" http://office.microsoft.com/en-us/as...spx?mode=print The photographs are stored on multiple hard drives including external drives that might not be available at all times. Since the actual photograph might not be available I thought I would create low quality, but small files of all the photos and either store them in the database as .bmp files or in a sub-directory that the database could access. I have had problems with both approaches. On page 5, the article indicates that it should be possible to store .bmp files in a table. However, I get the word "Package" rather than 'Bitmap Image" and the forms display a small icon plus the file name. The article says that there are problems with other formats but that .bmp should work. What am I doing wrong? The other approach I tried was small .jpb images stored in a sub-directory. On the bottom of page 5, the article says that relative paths should work. I like the idea of relative paths because moving external drives makes an absolute location risky. I can get a complete path to work and I can get just a filename to work if the image is in the same folder as the database. However, if the images are in a subfolder to the Access database folder I can't get it to work with a relative path. Here is an example: If the database is stored in: C:\My Documents\PhotoDatabase and there is a subfolder with the path C:\My Documents\PhotoDatabase\Photos I can put the pictures in C:\My Documents\PhotoDatabase and open the image with the filename only. Or, I can put images in C:\My Documents\PhotoDatabase\Photos and call them with the complete path. However, if I try to use a shortcut like this: Photos\filename.jpg it doesn't work. Am I doing something wrong or did I misread the artcile? Thank you for your help. David |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Combo Box AfterUpdate Help | Harry Thomas | Database Design | 21 | January 9th, 2006 12:16 AM |
Encrypt AccesS File? | milest | General Discussion | 2 | February 9th, 2005 07:58 PM |
Access Error Message when opening database | eah | General Discussion | 3 | January 26th, 2005 10:04 AM |
cannot change password | Richard | General Discussion | 13 | November 14th, 2004 10:00 PM |
What is MDE | Charlie | General Discussion | 4 | August 24th, 2004 04:15 PM |