Results 1 to 12 of 12
  1. #1
    Svein is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    5

    Need help with a image database

    I have just bought Microsoft Access, and I want to make a image database.



    All my pictures are stored in an own catalog where I have more than 120 000 images.
    The «Tekst» field contain all the information about the picture.

    Anyone who can help me to create a search form using the «tekst» field to search from,
    and then show all the pictures that match the search ?
    No picture are bigger than 1200x800 pixels.


    Click image for larger version. 

Name:	Access_Capture.JPG 
Views:	29 
Size:	120.1 KB 
ID:	39787




    PS…Sorry about my poor english


    Svein

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    don't have time to provide detailed help but can provide the following

    to find your search in tekst your sql would be

    Code:
    SELECT *
    FROM VossNow
    WHERE tekst like "'*" & [Enter Search Term] & "*'"
    you will then need to loop through this list to check image sizes.

    This will be a second query using a public function to determine image size

    see this link for how this might be done
    https://stackoverflow.com/questions/32465445/microsoft-access-vba-determining-image-dimensions/32465724

    assuming you called your function 'imageSize' and the first query is called qry1 it would look like this

    Code:
    SELECT *
    FROM qry1
    WHERE imageSize(1200,800,Filnamn)=true
    you would do this on the filtered list because it could take some time so searching perhaps 50 images will be a lot quicker than searching 120k

    This query would be the recordsource to your form - you would need to change
    [Enter Search Term] in the first query to reference the search control on your form.

    the imageSize function would look something like

    Code:
    function imageSize(iwidth as integer, iheight as integer, iName as string) as boolean
    dim fWidth as integer
    dim fHeight as integer
    
        'get imagesize per the link I provided, not clear what is exactly returned but you will probably need to break it down into width and height to populate fWidth and fHeight.
    Code:
        imageSize=fwidth<=iWidth and fHeight<=iHeight
    
    end function
    edit for some reason the editor has added code tags halfway through, treat both the above boxes as a single box

    and then show all the pictures that match the search ?
    your form would be continuous with an image control which would be populated with the path and filename

    Sorry don't have time to go into more detail, but should get you started

    Other things to consider on your search - is the language consistent or do you have to replace accented characters with alternatives?

  3. #3
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    You could add a field for "ImagePath" and save the location for each image, you could also show the image on the Form but doing this.

    Dave

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    @Ajax, not sure OP was asking for search criteria using file size.

    @Dave14867, if images are all in same folder, don't need a field for folder path. Full path can be constructed with expression in query, or Image control.

    For ideas on a search form, review http://allenbrowne.com/ser-62.html
    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.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    @Ajax, not sure OP was asking for search criteria using file size.
    think you are right - was in a bit of a hurry

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Svein,

    There is some confusion with your search requirement.
    Since English is not your mother tongue, you could write your question in Norwegian with whatever detail is needed, then, using Google Translate, post the English translation.

    Hvordan er denne oversettelsen?

    Svein

    Det er en viss forvirring med søket ditt.
    Siden engelsk ikke er morsmålet ditt, kan du skrive spørsmålet ditt på norsk med alle detaljer som trengs, og deretter legge inn den engelske oversettelsen ved hjelp av Google Translate.




    Lykke til med prosjektet ditt.

  7. #7
    Svein is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    5
    I have just gone into the purchase of Microsoft Access, so I am brand new in this area, so I am looking for some help with creating a database of all the images I have taken daily over the last 20 years, which now contain 120,000 images.
    Until now I have posted information about all the pictures I have taken in Access. One field (Biletid) that describes the image name, and one field (Tekst) with information about the image itself.
    All pictures are in a separate catalog.

    What I want with this is to find images that correspond to the search I do using the (Tekst) field in the VossNow database and show them.

    I really appreciate all the suggestions, a big thanks to you Ajax, but as a newcomer to access this is a little too high for me yet.
    Have attached a copy of the database, there are 100 posts, all 120 000 would be too large.

    VossNow.accdb

    Svein

  8. #8
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    June,

    Never gave that a thought, I have used it before where I have an image on the form, like for an employee for example(not what is in my file but as an example), and I have an "Add Image" command button that lets you search for the file and the file path is then stored. That way I can have different folders for images.

    Thanks for another approach.

    Dave

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    See if you can adapt my sample database showing all images in a folder together with information about each image
    http://www.mendipdatasystems.co.uk/f...wer/4594429467
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  10. #10
    Svein is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    5
    [QUOTE=June7;439730]@Ajax, not sure OP was asking for search criteria using file size.

    @Dave14867, if images are all in same folder, don't need a field for folder path. Full path can be constructed with expression in query, or Image control

    How can I easily do this, let's say that all the images are in a directory called "VossNowPictures".

    I want to link the images to the fields in the database without having to enter the image path of all the images.

    Svein

    VossNow.accdb

  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,816
    Expression in Image control ControlSource property. Review https://www.accessforums.net/showthread.php?t=73766, especially post 17.
    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
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Svein,

    Review this post/image database article for ideas.
    It includes a sample database for download.
    Investigate the material and post back with questions as/if necessary.

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

Similar Threads

  1. Image database with filters
    By simon7h in forum Database Design
    Replies: 3
    Last Post: 04-08-2018, 06:00 PM
  2. Replies: 4
    Last Post: 08-21-2013, 07:08 AM
  3. Image in access database
    By huBelial in forum Access
    Replies: 1
    Last Post: 03-30-2011, 02:15 PM
  4. how to insert image in database
    By sbglobal in forum Programming
    Replies: 1
    Last Post: 08-26-2010, 08:43 AM
  5. Insert an image in database
    By microbert in forum Database Design
    Replies: 1
    Last Post: 06-22-2009, 01:57 PM

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