two photos in same field

jairey

Jean
Local time
Today, 06:17
Joined
Aug 26, 2009
Messages
7
Access 2010. I am allowed to put more than one photo in a field. I can go back to the record and see the photos individually. But when I go to print a report, the first photo prints twice and the second photo doesn't print at all. Do I have to put each photo in its own field? I've tried that and I (obviously) can get both photos showing on the report.

But ... In some cases, my main object may only have one photo and I don't want the report to leave the blank space where there should have been a second photo. I thought I could use the "shrink" property, but that's not available for fields, apparently.

Any suggestions?

Jean Airey
 
The attachments field allows you to store multiple attachments (not just photos). But you have to structure your query for the Report in the way which will show both of them. The drawback is that the query will show the other data twice because it is a one to many you are displaying.

To show both pics, I believe your query needs to have the attachment field in the query referenced as

FieldName.Value

with the .value next to the field name instead of just that field name.

But I have not tested this as I do not store pics inside the database. I store them in a file folder with the PATHS to them stored and then display using a bound image control.
 
So if I manage to figure out how to set up a bound control to a path with the photos, or if the discrete field. value works, is there any way in a report to not show a photo that isn't there? (i.e. an object with only one photo)

Jean
 
A subreport with just the photos and ONE image control would be the way to go. It would then show all that are available - None, One, Two, Three, etc. dynamically.
 
So the "master" report would repeat the information for each photo?

Jean
 
So the "master" report would repeat the information for each photo?

Jean

No, if you set up the subreport to have only the photo field and the ID field which would tie it to the main report's detail section. So, if you have, say an ORDER ID which is being displayed in the detail section and you have two photos under that ORDER ID, you would have the Master/Child links of the subreport set to [Order ID] and then it would only display the other data once but show both pics.
 
Last edited:
The attachments field allows you to store multiple attachments (not just photos). But you have to structure your query for the Report in the way which will show both of them. The drawback is that the query will show the other data twice because it is a one to many you are displaying.

To show both pics, I believe your query needs to have the attachment field in the query referenced as

FieldName.Value

with the .value next to the field name instead of just that field name.

But I have not tested this as I do not store pics inside the database. I store them in a file folder with the PATHS to them stored and then display using a bound image control.


Do you store the path to the pictures as hyperlinks in your table? If so, when you design the report with the query as its record source, do you use an image control to return the file at that path?
 

Users who are viewing this thread

Back
Top Bottom