Programatically manipulating attachment images in Access 2007

F

Fred Boer

Hello:

I think I understand how to manipulate images stored as attachments in
Access 2007. I know how to load an image into an attachment field or remove
an image from an attachment field in code.

Now, suppose I have an image control on a splash screen, and I want to
programatically set the picture property of the image control, using an
image from an attachment field. Imagine that I have a table with an
attachment field that has a collection of images to use in the application,
and I want the splash screen image control to use image number 3 of 5 images
that are stored in the attachment field.

Me.SplashScreenImage.Picture= "***", where the *** means: "Use the third
image of the 5 images stored in the attachment field of the table...

And/Or.......

If it isn't an image control but an actual unbound *attachment control*..
how can I programatically tell it to use image 3 of 5.

I have a nagging sense that this is either way easier than I am making it,
or the question is totally wrong-headed, but what the heck! :)
 
F

Fred Boer

Hi:

This is as far as I've gotten today... I have figured out that if you have
an attachment control bound to an attachment field which holds several
images, you can programatically change the image displayed like this:

Private Sub Command6_Click()
If Me.Picture1.CurrentAttachment = 0 Then
Me.Picture1.CurrentAttachment = 1
End If
End Sub

Change isn't permanent, though... Well, Access playtime is over - back to
work! :)

Cheers!
 

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