1

Topic: To appropriate to the button, images from a control item a picture

ms Access 2007
On the form the button, and nearby two pictures lies.
I try to put in turn on the button from elements of type the PICTURE - their images.
Me! BTN.Picture = Me! Picture1.Picture
Meanwhile put on me, no more that.
------------------------------------------------------------------------
It would not be desirable to use for these purposes -  files with pictures.
Whether the task is solved?
------------------------------------------------------------------------
UNION OF RIGHT FORCES

2

Re: To appropriate to the button, images from a control item a picture

58;
You selected a picture of format JPG
And format BMP is necessary
So change a format and will be to you .

3

Re: To appropriate to the button, images from a control item a picture

58;
Probably.
But here such variant - does not roll
Form_N! BTN.Picture = Me! imag. Picture
It I try to appropriate to the button a picture, being on other form.
How to be in that case?

4

Re: To appropriate to the button, images from a control item a picture

58;
And what writes Access?
And here that
The gated in expression contains an object reference which is closed or does not exist.

5

Re: To appropriate to the button, images from a control item a picture

;

6

Re: To appropriate to the button, images from a control item a picture

I answered it:
[/quote] with itself? [/quote]
.

7

Re: To appropriate to the button, images from a control item a picture

;
Thanks.

8

Re: To appropriate to the button, images from a control item a picture

;
I see.
Thanks.

9

Re: To appropriate to the button, images from a control item a picture

58,

10

Re: To appropriate to the button, images from a control item a picture

58;
And  not so (a picture *.bmp or *.ico)

Private Sub Form_Current ()
If Me. CurrentRecord Mod 2 = 0 Then ' your condition
Me.btm0.Picture = Me.ris4.Picture
Else
Me.btm0.Picture = Me.ris5.Picture
End If
End Sub

11

Re: To appropriate to the button, images from a control item a picture

58;
If at you 2010 Access you can use SharedResources.
Ken Getz specially wrote down a roller:
https://msdn.microsoft.com/en-us/librar … e/gg490661 (v=office.14).aspx

Me.0.PictureType = 2 ' - sets type of a picture "General" (Shared)
Me.0.Picture = "ArrowUpGreen" ' - accepts a picture name, as instructions what to display

Never heard a voice of Gettsa? smile

12

Re: To appropriate to the button, images from a control item a picture

Vakshul Sergey;
:-)
Yes. MS Access-2007

13

Re: To appropriate to the button, images from a control item a picture

Strange.
After an insertion of the code of type

Form ("N").BTN.PictureData = Me! imag. PictureData

Ceased to work on everyone.
That is does not work as.
===================
Earned only when on new forcedly specified a location of pictures.
But only in such type when both the button and a picture - lie on the same form.

Form_FRM! BTN.Picture = Form_FRM! 1.Picture

14

Re: To appropriate to the button, images from a control item a picture

58;
About the link to the form see-bukovka "s"

15

Re: To appropriate to the button, images from a control item a picture

sdku;
Both with  and without  tried
Both with inverted commas and without....
A fig of a picture from other form are not thrown on the button on other form.

16

Re: To appropriate to the button, images from a control item a picture

58;
PictureData for the button perceives normally only (at least for Access with versions to 2007) the given pictures in format DIB. If there EMF - does not perceive. It is possible to check on the first byte: 40 - DIB, 14 - EMF. Roughly speaking

If Asc (Left $ (Forms ("Form")..PictureData, 1)) = 40 Then...

17

Re: To appropriate to the button, images from a control item a picture

76kd983;
Fig  subtleties...
Thanks that explained a pattern.
Situation at present the stable.
From the pictures lying near to the button - transfer is stable from any place of the program.
And pictures from pictures from other form are not thrown on the button on other form.

18

Re: To appropriate to the button, images from a control item a picture

After application reboot.
Picture transfer ceases to work.