473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Image Field Help.

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
1 1489
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
7
by: Tom | last post by:
hello friends I want to specify a field to save icons I want to give this field a maximum of 120kb for each icon to be stored in the db. what datatype should I assign to this field and how do...
3
by: Sandi | last post by:
I have a simple problem: I have an Access database (images.mdb) that has 2 columns: one is the id if the picture (an integer) and one (column named picture) is a field of type OLE Object which...
1
by: Coby Herd | last post by:
I have a content mgmt page that allows a user to update products in his store - (actually a used car lot). All of the fields work perfectly - when he puts content in.changes prices, etc it writes...
1
by: Kirthikaiitm | last post by:
Hi, I am totally new to Javascript and i am struggling to work with JScript. Pls help me in this issue. I have form with save,cancel and delete as image buttons. Eg. My code is <input...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.