Results 1 to 15 of 15
  1. #1
    DBenz is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    76

    Best way to display multiple images for one record and search on an image

    Hi,
    Access 2010
    all images on the form are linked, the image control has an adjacent field for the path to the image.
    I have a form displaying aircraft markings and emblems using png images.
    It also has a large image frame showing the aircraft.
    Whilst the code letters or numbers and emblems are enough once selected per aircraft, as they are not going to change, I have started making a second and third record clone for the same aircraft to display other photos of the aircraft.


    This I know is wrong !
    I wonder what is the best way of having the form show the various photos I have ?
    I did wonder about a form within a form, that form featuring the path and image from the path, so I would enter another path in the subform, enabling me to scroll through the images.
    I see June7 mentions an ability seen somewhere of one image frame and a button to scroll through images.
    Seems neater but where would I enter the path per image ?

    I also would like to do a find for all aircraft with e.g. a red dog by clicking on a search box and selecting the dog image, then all images with that path in their record appear.
    My original plan was to search on the word RedDog in the path by clicking on the path field and using ctrl F and type in *RedDog*, or even a multiple match on RedDog and also aircraft code Yellow 10 in a filter by form sort of way.

    DBenz

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    A subForm set to Continuous form.
    on it are the images.

    the master form would show singular data.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The 'scrolling through images in a single frame' is possible when images are saved into an Attachment field in db. As saving files in db can quickly use up Access 2GB file size limit, this might not be advisable.

    Unless you want to have a limited number of images and use a field for each image, the images should be in a related dependent table where each image is in its own record.

    Can certainly search and filter on text field that stores image path.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    DBenz is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    76
    Hi
    RANMAN256....A subForm set to Continuous form.
    on it are the images. the master form would show singular data.
    My main picture file path was Picture1_FilePath
    I have created a new table with fields:-
    IDPicture1_FilePath Autonumber PrimaryKey
    IDAircraft text
    Picture1_FilePath text

    then created a form for this then added an ImageFrame and made its ControlSource Picture1_FilePath
    I then opened my Aircraft form into design view and using the wizard tool and subform, I added this form I just made.

    I related it to the Tbl_Aircraft on the IDAircraft field, the wizard seeing the one and only relationship available anyway.

    I now take the Path out of the still existing Picture1_FilePath and paste into that field in the subform. Move fwd and back one aircraft record and it displays, BUT WITH A FINE BLACK GRID OVER IT. about 3.5mm square on my 1920px wide monitor. (bout 13pixels square) Ditto next photo etc yet these photos never had that when in the main form.

    Also when I delete out the FilePath from the main form after moving it to the subform the subform image also vanishes. I had noticed that the subform pulled in the Path from the main form though didnt display an image for it, only when I copy pasted the path in and went fwd and back did the image appear.

    I am unable to delete the path from the main form for e.g record#25 without nuking all images in the subform including the paths in the subform FOR THAT RECORD #25. and ther pics are ruined with this fine grid.

    I open the form on its own and still the images are with this grid, so its not the fact that its sited with a main form.
    I make a new form related to the original Aircraft Table, just with imageFrame and image path, basically the original main form less everything but path and image control, this also now gives a grid over images,.

    I have not made it a continuous form yet, I may prefer to 'next button' my way through them.

    Whats happened ?

    DBenz

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    If you want to provide db and an image for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    DBenz is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    76
    Hi,
    In order to put this out to internet, as its confidential and for other reasons,
    Spent the whole evening and stripped out a load of fields and data, renamed some fields etc etc, it still has reference to something deep in its inner workings I cant remove.
    I would need to get it to you without involving internet and you send me answers I could vet before they go on the net to ensure they dont refer to field names I wished to keep secret !
    A lot of hassle.

    After trying out different raster image file formats such as index.bmp greyscale.bmp greyscale.jpg, and so on, creating a new database, I have found that the form in the width I made it to fit the existing image frame space, had made the image frame width a bit less due to the grey left hand side vertical margin of the form and discovered that access 'zoom' option for the frame is incapable of handling photos ! widening the frame loses the fine grid but messes up my form design now. So its access at fault. A bug I presume. its not able to resample the image smaller like a photo program would. Zoom is lacking the 'brains' to do so. Widening the image frame sees the picture larger and no grid is then visible.
    This is a pain as it means photos have to be designed for the frame now. Everything needs resizing. damn !
    old access didnt do that.

    Also to overcome Picture1_FilePath being somehow linked to the same field name in the table for the subForm, though I linked them on ID_Aircraft, I have created a new field called MainPicture, now I can delete the field Picture1_FilePath and not nuke my subform table.

    Is this another bug or something that is of my making ? i.e can one have same field names in two tables when the tables are not linked to that name ?

    DBenz

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Same field name can be used in different tables, but not advisable. Can even link on fields with same name, just have to use the table name as qualifying prefix.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    DBenz is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    76
    I would now say unadvisable as it sure as heck seemed to think it was related.

    I have resized my imageFrame smaller from the 'opened from old access dbase', its set to zoom, always has been, and images despite doing that are fine.
    If I create a new imageFrame in this dbase now that it resides in Access 2010 and give it controlSource as is the method with 2010 , deliberately a bit smaller than image, its then got a grid over the image.

    I have asked in another thread, just how does old access manage without an apparent control source, it works far better however it does.

    I need to make a frame using old access method ! I cant have pics ruined with grid with new method.

    Does anyone feeding an imageFrame a bmp image get a grid over it if frame is smaller than picture ?

    DBenz

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Prior to Access 2007, had to use VBA code in Format event setting Image control Picture property to dynamically display external images in reports. However, this will not work with forms. So I am guessing did not display images on forms unless they were embedded in table.

    No problem with bmp. It just resizes to fit the Image control.

    Again, if you want to provide one of your images for testing ...
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    DBenz is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    76
    Hi,
    I have just opened up my database v3 from a few days ago, every time I dabble I first save it as a new version number , latest is v6.
    set its image frame to a smaller width from 18.61 to 16.309 and given it a path to a new image which is an index colour greyscale .bmp of a Tornado, looks lovely,
    ditto the image frame within my subform in v6, fed it same image and its poor with a grid.
    see attached screen dump. Test1.

    attached that image along with two Tiggie bmp files. had to zip it as it said invalid zip it, yet its a .bmp so why that ?

    anyhow also attached the v3 and v6 comparison,

    TEST 1. v3 sees a non subform image frame created in prior access2010 and behaving itself, nice image, frame deliberately resized smaller for this test, zoom property, working as should do.
    v6 new image frame controlSource method used as is now what we have to do, same width and a mess results.

    both are greyscale bmp images, same image. as bmp is best for access. or have access altered that as well now ? grrrr. I read that jpg is not so good, on this forum somewhere. I have thousands of bmp for access so if access have shunned bmp then %$£&(*^%$ !!!!!

    if an image is converted to greyscale then saved as bmp, its RGB whilst still open, but reopen it and it is index mode. I have never spotted it does that before, Try as I might I cannot save as greyscaleRGB .bmp and open it as greyscaleRGB bmp

    TEST 2. also attached is effect with colour bmp image, Tiggie original pic converted to index color then saved as bmp. a mess
    TEST 3. then a test with same original image this time saved as RGB bmp, still a mess, so the index mode is not the cause here. Its the controlSource new imageFrame method of access !!!!! My previous methof ImageFrames work fine, if only I could know how to keep doing it that way.

    Note upon opening tiggie.bmp its still in RGB mode and has not become index. so one can have an rgb colour bmp or index color bmp.
    but one can only have index greyscale bmp !

    TEST 4. I widen to 18.61 the image frame of the new image frame in V6 subform and photos lose the grid. though now its overlapping my data boxes !

    all test results attached.

    DBenz
    Attached Thumbnails Attached Thumbnails compare v3 to v6 old and new imageframe methods grid effect.jpg   test2 Tiggie_Index bmp image mess.jpg   Test3 tiggie bmp still rgb mode mess.jpg  
    Attached Files Attached Files

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Might find this thread about image quality interesting https://www.accessforums.net/showthr...t=73766&page=2

    I added each of your images to Image control on form and report via ControlSource. Displays fine on form and ReportView but PrintPreview has the distortion.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    DBenz is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    76
    Hi,
    made a new image control in same access dbase v6 and it gives grid, created new Database from scratch and no grid.
    Access 2010 when opening up my existing old access dbase has somehow wrecked it and it wont accept new image control method failing to have zoom perform normally.

    Have you an old access database prior access 2007 you can clone then open into 2010 ?
    see if it does this on that ?

    Those views I uploaded are in Form View, I have never created a report, and I dont have switched on print preview as I presume such is for a report anyway.
    So you are saying the images I sent , if displayed in an image control made deliberately smaller than the image,
    with these settings:-

    Picture type linked
    Picture (none)
    Picture tiling No
    size mode zoom
    picture alignment top left
    Back style transparent

    they do not display that terrible grid and look bad.

    are you sure the frame is smaller than image for if the frame does not need to apply zoom then the picture looks ok.
    my frame was 18.61 width and I am 1920 x 1200 resolution monitor, so I need to be sure that zoom is being applied by access. make it smaller still so we are in no doubt please.

    CAN YOU UPLOAD YOUR TEST DBASE AND I WILL OPEN IT ON MY PC TO SEE IF THE ONE YOU MADE DOES IT HERE.


    Why is it that is happening to me ? It is Access at fault if a new dbase doesnt do it.
    Spent hours and hours trying to solve this.
    This is a form, and was always able to display such images, since dragging out a new image control (the two mountain peaks and sun) and having to use ControlSource to feed it the path, they do this. The image frames from the existing database dont do this.

    Could a few other readers try this out please as I need to work out how to overcome this mess.

    I am unable to progress with making images now until this is solved.

    I also see in another forum:-
    Try getting an image as BMP file of exactly the same size as your Image Control on your Access Reports.

    I usually find that as soon as Access has to shrink or stretch the image to fit the Control, the image is not as clear as the image that just fits the Access ImageControl.
    Van Dinh

    Something has changed for sure, I wonder if this poster had opened an older dbase into younger access, this was in 2014.




    DBenz
    Attached Thumbnails Attached Thumbnails Image Control old and new access.jpg   new dbase left old dbase right.jpg  
    Last edited by DBenz; 02-24-2019 at 11:38 AM.

  13. #13
    DBenz is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    76
    Hi,
    I have a 20.5cm wide image space when subform is not in design view, and I have made the properties 20.5cm width.
    trying each of the three test images 19 20 and 20.5cm they max out at 19.8cm width on my monitor, the 19cm measuring 19cm width

    (screen res 1920x1200)

    what decides the display width ? How can I get image to be 20.5cm in a 20.5 cm frame ?

    attached the three images.

    Its set to zoom and top left and linked by the way

    DBenz
    Attached Files Attached Files

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    What is the height of control?

    I set 8" width and 4.5" height and the 20.5cm image fills the control perfectly.

    Don't really understand the issue.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    DBenz is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    76
    Hi, silly me the height became the controlling factor, after the width was taken out of the issue,

    however now another problem, and I thought I had solved the crappy images by staying with the code route.
    what worked in form, doesnt work in report.

    as you said:-
    I added each of your images to Image control on form and report via ControlSource. Displays fine on form and ReportView but PrintPreview has the distortion.
    but if I click printpreview to turn it off my image is gone, how can I view my reports with decent images ?
    they print out ok, but I am using them on screen instead.

    Also how do I place an image into a report if its held in a subform ? and have the next image for the same record appear on the next report page, ideally first page has the data, and the first image, then subsequent pages display just the pics assoc with record 1, then when all are displayed the next page shows data and 1st pic for record#2, then next pages the other pics, and so on.

    Spent the whole week overcoming Msoft image issues. How do I get reports to look good ?

    Just what is the way forward, does office365 still do this ? I dont want to pay £10 a month to fix Msoft's mess though.
    Should I rebuild from scratch all my databases, thats many hundreds of hours of work, recreate all the coding no doubt things will break, and I am not a coder. The friend who built it for me would have to do it all again. sounds as if though Report is a problem with new method anyway.

    CHANGE OF FORMAT... big decision pending !! jpg gave the best image and least size, all good to have, is jpg compatible with office or going to cause me other problems ? bmp muted the reds I noticed so I will avoid bmp now if poss ! Must make the right move after all this grief so a very important question is this.

    I also see on internet many folk bitterly complaining of these lousy images in report starting with access2007 when 2003 worked fine, and still extant in 2010 saying Msoft cant be bothered. oh dear.
    a setting convert to bitmap fixes it for some, I see I already have that setting turned on, so no joy there. Its Msoft at it again. Grrrrrrrrr. if only they would fix these glaring horribles.

    I then see a supposed solution to overcome Msoft failures here at http://access.bukrek.net
    so I install that, its made no difference at all, unless it requires a different image control to the two mountains and sun icon ?

    DBenz
    Attached Thumbnails Attached Thumbnails bmp png jpg report mess.jpg  

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 05-31-2017, 07:09 AM
  2. Multiple Images Per Record
    By Mandody in forum Access
    Replies: 10
    Last Post: 04-07-2015, 05:15 AM
  3. Select a record and display an image
    By Chris G in forum Forms
    Replies: 5
    Last Post: 11-01-2012, 04:38 PM
  4. Replies: 1
    Last Post: 09-27-2011, 08:55 PM
  5. Replies: 17
    Last Post: 08-26-2009, 11:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums