sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Kissi Asiedu's Avatar

Image Field Help.


Question posted by: Kissi Asiedu (Guest) on July 14th, 2006 02:05 AM
I am trying to create a table with fields "PRODUCT ID" and "IMAGE". How do I
save a picture in the image field so that I can run a report with the
Product ID and the corresponding picture?
Thanks for your Help.



1 Answer Posted
sulemanzia@gmail.com's Avatar
sulemanzia@gmail.com July 14th, 2006 03:45 AM
Guest - n/a Posts
#2: Re: Image Field Help.

kissi
from my knowledge. i am pretty much sure this thing works for Images
also. anyways what you need to do is create a button and a textbox
which is bound to that button field so then you can open a dialog box
open/save which will give you access to add an attachment. you need to
create a standard module here is the link:

http://www.mvps.org/access/api/api0001.htm

just copy everything from start code till end code and then go to
properties on that button and Onclick event type this :

Private Sub Button_Click()
Me.YourTextBoxName = GetOpenFile(CurrentProject.Path, "Select Source
File")
End Sub

and then go to properties of your textbox in Onclick event and type
this :

Private Sub YourTextboxName_Click()
Application.FollowHyperlink (YourTextboxName & "#" & txtLOC & "#")
End Sub

you will see that you will get an option now to add an attachment. you
can add anything you want to .doc or .xls or .mdb or .jpeg. to enter an
attachment for an image type the entension of the image in the:
Function GetOpenFile()
you will see the code something like this :

' Define the filter string and allocate space in the "c"
' string Duplicate this line with changes as necessary for
' more file templates.
strFilter = ahtAddFilterItem(strFilter, _
"Access (*.mdb)", "*.MDB;*.MDA")

you can add as many extensions you want with "*.jpeg;*.bitmap, etc

hope this will help you.
Thanks
Kissi Asiedu wrote:
Quote:
Originally Posted by
I am trying to create a table with fields "PRODUCT ID" and "IMAGE". How do I
save a picture in the image field so that I can run a report with the
Product ID and the corresponding picture?
Thanks for your Help.


 
Not the answer you were looking for? Post your question . . .
196,972 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,972 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors