jpg from clipboard to image field in Access 2003

  • Thread starter Thread starter Charles GUELDRE
  • Start date Start date
C

Charles GUELDRE

How to paste programmatically a picture (jpg) from the clipboard to an
image field in Access 2003?
 
It's what I try first but : Microsoft Access can't move the focus to the
Image Control.

I have tried with :
me.Image0.setfocus
and
docmd.gotocontrol "Image0"
 
I hope that you are not wanting to embed the images in your database! This
will cause database bloating and is typically bad practice. See,

http://www.mvps.org/access/forms/frm0030.htm

What you should be doing is storing the path/filename of the images. Once
again, refer to the link provided above

Post back if you need more info.
 
What my user wants to do is for example :
copy an image from a Word doc( or other source) and paste it into a image
field in a form.
 
You need to do some automation in that case. Temporarily copy the image to a
temp table of sorts, then using code copy the images to a set location and
create only a link (path/filename) within the database. Then as each image
is processed, delete it from the temp table.

Do not hold the actual image(s) in your db!!!!
 
As Daniel has already pointed out, you'll need an intermediate
file. But, as Daniel also pointed out, you do not want to store
images in your database.

I have an application wherein the user has scanned or otherwise
obtained an image on the clipboard. I direct the file naming from
within the hosting form's class module where the user stores the
image. The application's tables contain the name of the file containing
the image and is correlated to the autonumber of the corresponding
record. E.g., c:\AppFolder\AppImages\Im000438.jpg.

My form has a command button, "Import Image", that creates an
empty jpg file and opens whatever graphics editor the user has
available. The user pastes his/her image into the current graphic
window and saves and closes the current graphic window. When
all other "required" information is completed, I save the pending
record into the database, obtain the autonumber assigned and
rename the image file accordingly, all the while poised to purge
everything if the user aborts the operation.

The application necessarily has "user installation parameters" that
are contained in one of its tables that, amongst other things,
specifies to the application user chosen folder names and what
graphics and/or text editors the application is to use.

Post back if you have any questions.

Bill
 
Back
Top