Can you store images in an Access DB, if so, how do you do it? can you store the physical image in the DB or do you store the path to the image?<br><br>Any help will be much appreciated.<br><br>Paul W.
You can create a field with a datatype of Object (or OLE Object), which can store the image. You might be able to store the path in a field with datatype of hyperlink.<br><br>Would either of these work for you? <p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br>
You can create an OLE field and either link it (image remains in original state) or embed it (image contained in your database). Your choice.
Put it in your forms On_current event.<br>--------------------------<br>Private Sub Form_Current()<br> If Me![ID] <> 0 Then<br> Me!Image14.Picture = "p:\ViewPhotos\Photos\" & Me![ID] & ".jpg"<br> Label20.Caption = "File: " & " p:\ViewPhotos\Photos\" & Me![ID] & ".jpg"<br> End If<br> <br>End Sub<br>---------------------------<br>Add an "Image" control to the form not a bound box.<br><br>This also keeps your database from getting real huge because the files are still on your hard drive and loaded as needed instead of being embedded in the .mdb. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
Another benefit to storing a link to the file instead of the actual file, is that sometimes you want to change the image. A new company logo, or a picture of that employee from the company picnic. All you do is copy the image to the location that you "mapped".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.