Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy image type controls 1

Status
Not open for further replies.

air1access

Technical User
Jan 27, 2008
123
US
I have a form with several image type contols. What I want to do is use a hidden image to copy, and paste it in the same location of other image controls I want to delete. AND - enter in the tag propety of each "new" image the tag property of the image its replaceing... The current images are scattered all over the form in the different locations. So I guess it would be a loop of some sort...?? Any ideas or suggestions..?? Examplse...??
Thanks in advance...
air1access
 
can you restate this clearly? No idea what you are saying.
What I want to do is use a hidden image to copy, and paste it in the same location of other image controls I want to delete. AND - enter in the tag propety of each "new" image the tag property of the image its replaceing.
 
I'm wit-chya... Let me try again..
Say there is several image type controls (acImage) on a form. Each one placed in different locations/positions in the details sections of the form. Then in the form footer I have a different image control. What I want to do is replace each image in the details section with the one in the footer section. Each image in the details section is "tagged" with different values - which would get "copied" over to each NEW "replacing" image... I sure hope this makes more sense...!!??

Any ideas/suggestions/examples...?
Thanks..!!
air1access
 
how about
Code:
Me.Imagedetail.Picture = Me.Imagefooter.Picture
Me.Imagefooter.Tag = Me.Imagedetail.Tag
put this code in what ever event you want this to ocour
 
Private Sub cmdCopy_Click()
Dim ctl As Access.Control
For Each ctl In Me.Controls
If ctl.ControlType = acImage Then
ctl.Picture = Me.footerImage.Picture
ctl.Tag = Me.footerImage.Tag
End If
Next ctl

End Sub
 
Majp,

Alrighty then... That definetly gets me in the door...!! I can take what you provided & work with it...
Thanks for the help..!!

air1access
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top