Results 1 to 7 of 7
  1. #1
    Join Date
    May 2009
    Posts
    3

    Image control in MS Access

    Can you help me out with the following problem:



    I have an MS Access 2003 DB and an MS Access form as its front end.
    I have managed to write code to capture image from a webcam to an image control in the access form.

    Now can you tell me how can I store this image from the image control to the OLE Object feild of the database.

    I want to store the images and not file paths etc....

  2. #2
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    Just to give you a heads-up...Access has a file size limitation of 2 GB...functionally, it starts creaking at something like 1.5 GB.

    It is my understanding that if you store an image in an OLE field is essentially stores it as a bitmap --> no compression.

    Thus, storing images in Access is typically strongly discouraged. The file size bloats up faster than a week dead sheep on a summer day. That's why most folks resort to storing the file paths to the image rather than the image itself.

    You may know all this, but in case you didn't, I thought you'd want to know before pursuing this line of inquiry. (I'm afraid I can't help you with the particular solution you're after because I've always avoided doing it myself)

  3. #3
    Join Date
    May 2009
    Posts
    3
    Okay like I know this method works.
    I myself would do it. But the person for whom I'm designing this stuff is a naive user. So if the file paths change then I'm not sure he can work around that problem : (

    That's why I asked for this particular solution...

    Can you please help me out !!!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Craig's suggestion is a very good one. Maybe you want to look into ac2007 which has an Attachment field type that does a far better job of storing pictures that prior versions of Access. Maybe what you need is all of the pictures stored in the same directory and implement an easy way to save and change the directory in your program. To that end, this link should help.

  5. #5
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    Yes, thta's basically what I do. I have a subfolder in the same directory as the database which contains all the pictures. I then store the relative path from the database to the file in the subfolder.

    Then I always can refer to the file's location using
    CurrentProject.Path & storedrelative path_here

    This way, no matter where the user might place the database, as long as they move the subfolder with the mdb file, the path never needs changing.

  6. #6
    Join Date
    May 2009
    Posts
    3
    Hey,

    Yes good suggestion, will look into that and get back to you

  7. #7
    Max D's Avatar
    Max D is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    63
    You'll find some problems again and again when coding image storage. Beside that, its usually not easy for users to manipulate images in such a database.

    There is a ActiveX control called AccessImagine, which handles external image storage automatically and makes adding images to database convenient - you can load from file, scan, paste from buffer or drag-n-drop. You can crop image right inside the database and do much hard-for-Access tasks with it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-06-2009, 07:25 PM
  2. Access Calendar Control
    By JGG in forum Access
    Replies: 7
    Last Post: 04-03-2009, 04:34 AM
  3. Access - Calendar Control
    By James890 in forum Forms
    Replies: 3
    Last Post: 04-01-2009, 04:52 PM
  4. Formating a control in MS Access Reports
    By Alex Motilal in forum Access
    Replies: 3
    Last Post: 11-15-2008, 09:09 PM
  5. clock control in access
    By kfoyil in forum Access
    Replies: 0
    Last Post: 12-02-2006, 01:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums