Insert image from clipboard into Access 2003 form

N

NancyM

I have an Access 2003 project, connected to SQL server 2005 Express. I have
a table called Image. It contains 2 fields. One is the id. The second is
an image field called YarnPrepImage. I would like to use HardCopy Pro to
copy an image to the clipboard and paste it into a box on the form in the
project.
How do I programmically paste the image into the field?
Thank you for any help.
 
J

Jack Leach

Any specific reason you want to use the clipboard to do this? If it's an
image format that's acceptable by the access form Image control, you can use
an unbound image control on the form and set it's Picture property to the
path of the file. Store the path of the file into a field in the table, and
use the path in the OnCurrent event of the form to manage the active picture:

Private Sub Form_Current
If Not Isnull([ImagePathField]) Then
Me.PictureControl.Picture = [ImagePathField]
Else
Me.PictureControl.Picture = ""
End If
End Sub

This way you can store the image as a path, cutting down considerably on db
size.

This also assumes that your pictures are stored in a structured manner for
access to find.

Not sure if this is exactly what you're looking for, but I thought I'd throw
it out there.

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top