Re: Graphics in Report



Larry,

You did provide good guidancein your first post. I nneded to work harder to
understand it in my context. I am learning and am not familiar with all of
the conventions. I really thought intellisense provided all of the available
properties. And, text1 on my report was a bound control named text1.

Thanks for you suggestions on using the "Me" prefix for controls. I will
try to use in my application and see what happens that is different.

I did solve my dilemma of not being able to show the corresponding graphic
on the same page as the rest of the details for that graphic. Thank you for
you suggestions. I had to "discover" how to add an event to a report. I
never had to do that before.

Dan



"Larry Linson" wrote:

"DanRoy" <DanRoy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote

Larry,

> Next, I wanted to be able to change the picture
> as the Text1 fieldname changed. The Text1 field
> name is also in the details section. This did not work!

This is not what you showed in code. And "did not work" is not very
specific. I hope what you wrote actually translates to "change the picture
when the value displayed in the Text1 Control changes" and in a Report, that
will only change when a new Record is displayed. "Text1 fieldname changed"
just does not make any sense, assuming as I do, that "Text1" is a Text Box
in your Report.

No, I did not need additional explanation. I am convinced that I understood,
and that I gave you the correct answer. I rarely go back and review my
"archives" to determine detail such as "Picture will not show as a property
in Intellisense, but you can just type it in and it works just fine". Now I
did go back and review, to make sure I had not overlooked something else.

For my purposes, I do not refer to Controls without prefixing them with
either the "Me" shorthand to represent the current Form or Report, or a
reference to a particular Form in the Forms collection. It is always
difficult to guess in what areas the Access team may decide to be "stricter"
in interpreting code statements. And, for my own and others' convenience, I
use the Red*** VBA Naming Convention (usually at the simplest level),
described in detail at http://grr.xoc.net.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Image220.???? = "c:\Test\ECP0412.gif"
End Sub

I would have expected to have identified the control, image220.picture, as
the receiver of the filepath and filename, but Picture was not an
available
choice to me.

Whatever you expect or see in Intellisense, Picture is a property of the
Image control. In a sample database, the following works for me, even though
when I enter character-by-character, the same line of code immediately below
it, Picture does not show up in the list of Properties for Intellisense in
Access 2003.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me!imgImage.Picture = Me.txtImagePathAndFile
End Sub

Bug? Probably. Worth worrying about? No, type in the value and see if it
works... You are not limited to "choosing" a value. And, this is not the
only property that doesn't show up in Intellisense in Access.

In my case, I wanted to display a different picture for each record, and the
Control "txtImagePathAndFile" is bound to the Field containing the path and
filename of the picture for that record. I note that once I put the Image
control on the Report, I went back and deleted the original value from the
Picture property, so that Property in design view shows (none).

Good luck with your Report,

Larry Linson
Microsoft Office Access MVP



.