By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 994 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

Image Field Help.

P: n/a
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.

Jul 14 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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:
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.
Jul 14 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.