The best way of putting picture in Form and Report

hfsitumo2001

Member
Local time
Yesterday, 20:26
Joined
Jan 17, 2021
Messages
381
Again, I need to raise again this question, because I want to know why using attachment system, even in Access 2016 is not good.
Below is the picture of my form using attachment field in the table. It has already it's own way, if we hover our mouse on the frame, it will say what to do, after we double click it, it shows us next step, whether we want to add, to remove, and so on.
So in my opinion, it is already like OLE. Maybe June7 and others experience is base on the old version of MS Access, while the new version maybe Microsoft has improved their Software. I do not know what is the VBA in side the MS Access 2016, it already comes that way.

Mine, I already tested form with picture and print report with almost 100 pictures, it seems no problem so far. I appreciate your idea before I go live.


pict1.jpg
pict2.jpg
 
I keep mine in an OLE field and it works fine. Tho you run the chance of filling the db very fast with lots of photos.
1 solution is to have an external db that holds only the photos. LInk this table into the main db to keep the size small.
 
I keep mine in an OLE field and it works fine. Tho you run the chance of filling the db very fast with lots of photos.
1 solution is to have an external db that holds only the photos. LInk this table into the main db to keep the size small.
What is the data type of your OLE field, is that short text for the image path?. Are you guided by the screen tip when you want to add or remove the picture when you hover your mouse on the picture frame?
 
it seems no problem so far.
if you don't change/add/delete image often, then i guess it is ok.
but the question, do you have control to prevent the image from being replaced by the user?
 
I don't use the attachment data type since it is not supported by SQL Server and most of my BE's end up as SQL Server. And as the others have said, there is the bloat problem with storing graphic objects in the database. If you store the path to the picture, you can use the FollowHyperlink action to open it or load the image into an unbound control.
 
I don't use the attachment data type since it is not supported by SQL Server and most of my BE's end up as SQL Server. And as the others have said, there is the bloat problem with storing graphic objects in the database. If you store the path to the picture, you can use the FollowHyperlink action to open it or load the image into an unbound control.
Do you have the sample Hartman?, I had path method 14 years ago for church membership, but at that time when we want to add photo by pressing button, but it is difficult for the user to add photo.
 
This is the code from a report that includes a logo and the logo varies based on the company so it is not embedded in the report.
Code:
 Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)   
    If Me.LogoPath & "" = "" Then
    Else
        Me.imgLogo.Picture = Me.LogoPath
    End If
End Sub
 
This is the code from a report that includes a logo and the logo varies based on the company so it is not embedded in the report.
Code:
 Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)  
    If Me.LogoPath & "" = "" Then
    Else
        Me.imgLogo.Picture = Me.LogoPath
    End If
End Sub
But do you think the picture can be put in the inventory list report? for about 100 pictures?
 
Try it using a bound control. In the format event of the detail section change the ControlSource to the value from the saved path for that record. This assumes that the pictures are one per row/column. You can print multiple pictures per row if you use columns in the detail section. of a subreport
 
One idea I had, I was thinking if I ever DO allow pictures as local attachments, I'd probably just restrict the filesize that could be added (maybe png only, usually very small). I'd also do a calculation using insight from the business: i.e., we plan to add x number of attachments per week ... and do some calculations to make sure the db has years of use left - and in that scenario, it certainly might not be "bad". It just all depends on how much you control the input/upload.
 
I don't use the attachment data type since it is not supported by SQL Server and most of my BE's end up as SQL Server. And as the others have said, there is the bloat problem with storing graphic objects in the database. If you store the path to the picture, you can use the FollowHyperlink action to open it or load the image into an unbound control.
Pat, I just read when I googled that attachment is not supported by SQL, can you give the sample of your form with VBA to put the picture, so you have like Image path right?. But can it do when we hover our cursor under the picture frame, it will say what to do, when adding the picture?
 

Users who are viewing this thread

Back
Top Bottom