Tried inputing the code (in section on open and on activate) as you out lined and got errors
1st it said can't find report so I added the name of the Report LabelAugustPhotos
then it said it could not find Photo Location so I added the path to the table
same with the File Name
Reports!LabelAugustPhotos![ImageNewLetter].Picture = Reports!LabelAugustPhotos![Products.Photo Location] & Reports!LabelAugustPhotos![Products.FileName]
Now it is coming back with
You entered a expression that has no value
I guest I still don't get it. I have the following fields open on the lable
1) ImageNewsletter (image)
2) Products.ProductID
3) Text2 (Name of the item)
4) Products.Photo Location
5) Products.FileName
Len,
If the list you give there is your fieldnames then you have INVALID field names being presented in your report ie fieldnames should
not be using a fullstop (period) you need to change them alias them or something in your underlying query else it will not work.
I know in essence that what you have been trying to make work there from the result of my last post only mirrors what I posted back to you and in essence I was wrong to do that, but because I was merely trying to get across the 'principle' of the thing
based on what you have I didnt go into the basics of database design and that is to say this...... field namings should have a naming convention and there should be no spaces unwanted syntax like periods slashes etc which of course is what
is in the command you have been working with
FROM the result sent by my last post . So blame me on that one I put my hands up because what I have done there is add to the pile of errors you already have.
But as importantly you are not entering the code in the correct place either. In my first post I mention the ON FORMAT event you mention the ON OPEN and ON ACTIVATE. Neither the ON OPEN or ON ACTIVATE are relevant to this because no records are formatted at the point that the report is opened or activated it is only when the records forming part of the DETAIL section are trundled through by the report does the updating of the image control become relevant and that is when the DETAIL section gets FORMATTED so it is only the ON FORMAT event you need to work with
By entering the command you have into the reports ON OPEN AND ON ACTIVATE events this will cause Access to throw errors about not knowing this field or that field because it doesn't indeed know until it actually gets to FORMAT them if you understand me. This whole sequence if you like is an order of events that must take place in sequence and in order. Have a look at 'form events' in help it will give you the idea as to the order of them..... the same in principle exists for reports.
And as for a man who knows what he's doing that may well be the case but I only consider that for myself, if I steer you in the RIGHT direction and if thus far is anything to go by, I would have lost a few shillings for myself in the PR dept if I had been you at your end ......LOL
OK.....so let us assume that you have aliased your fieldnames so that you have fields with the names as this
1) ImageNewsletter
2) ProductID
3) Text2
4) PhotoLocation
then the below WILL absolutely work
Reports!LabelAugustPhotos![ImageNewLetter].Picture = Reports!LabelAugustPhotos![PhotoLocation] & Reports!LabelAugustPhotos![FileName]
if you have the below (notice the space in location):
1) ImageNewsletter
2) ProductID
3) Text2
4) Photo Location
then the below will
STILL absolutely work
Reports!LabelAugustPhotos![ImageNewLetter].Picture = Reports!LabelAugustPhotos![Photo Location] & Reports!LabelAugustPhotos![FileName]
BUT when you have spaces like that you are obliged to wrap the name of the field in square brackets and extra unnecessary step you might think and that would be true because what Access is saying unto itself is....... "
Hey I don't like this!! I need to know where the space is that you put in there, therefore I am going to wrap the whole string after the last exclamation mark in brackets so I know what I am working with here!"
if you have the below (notice NO space in location):
1) ImageNewsletter
2) ProductID
3) Text2
4) PhotoLocation
then the following will work
Reports!LabelAugustPhotos!ImageNewLetter.Picture = Reports!LabelAugustPhotos!PhotoLocation & Reports!LabelAugustPhotos!FileName
And to cap it ALL and possibly add to the confusion even more for you to consider
The reports knows the name of itself so you could actually reduce all the text you have to type there by simply introducing the keyword
ME on the occasions where the report, or form for that matter is referring to itself
So going on that principle the folowing will also work:
Me!ImageNewLetter.Picture = Me!LabelAugustPhotos!PhotoLocation & Me!LabelAugustPhotos!FileName
I apologise for 'adding' to any problem rather than taking a little more time to explain fully. Sometimes we have to assume certain things and presume outcomes and in this case I assumed wrongly and presumed too much
I hope you get your result this time (unfortunately I am going on vacation for a week in Cyprus as of today so may not see any post back from you but I will keep this threaded on my list to ensure you get a resolution
Regards
Jim