Results 1 to 7 of 7

Product DB

  1. #1
    Tradesman is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    18

    Product DB

    Im putting together a contact db ( see my other thread ) and now i have the bug would like to build my product db.



    i have a folder full of images 2500+

    I would like to refer to the images in an output.

    I cna only see how to link to a path in a seperate folder.

    however this looks like a manual process . i excel i would concantenate the code.

    Each Image starts with a 5 digit part no. but may be longer of there is more than one image.

    How can I refer to these - I can assume theres no more than 6 images per item.

    as i get more products I get more images - i get a data dump in xl;s which i could update the master file with.

    looks slightly complicated to me but im sure its possible.

    I also have a seperate file with detailed descriptions and Features and benefits.

    ideas please - or where to look

  2. #2
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    1,248
    What does your data actually look like, what are the file paths, and what is the file naming structure?

    Examples always help with this type of question.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Tradesman is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    18
    ok minty i can save the images into the db folder so be something like

    C:\Users\stuart\Documents\Database\Product Images\12345.jpg

    its only for my local use for now-i want to use this and other data to produce a data sheet

  4. #4
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    1,248
    Okay - that looks like pretty much like I expected, however what happens when product code 12345 has another picture.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,154
    if you are going to put the final product on a shared network drive it should be fairly simple to figure out the path. I would, however, split the database into a front end/back end so each person can have their own copy of it.

    let's say a person had item 12345 selected. you could get a list of files this way:


    Code:
    dim sPath
    dim fs, fsFile, fsFolder
    dim iProd
    
    iprod = x 'this is where you'd put in your product number i.e. pulling it from a text control or list box on a form
    
    spath = replace(currentproject.path & "\", "\\", "\")
    set fs = createobject("scripting.filesystemobject")
    set fsfolder = fs.getfolder(spath)
    set fsfile = fsfolder.files
    for each file in fsfile
        if left(file.name,5) = iprod then
            debug.print file.name
        endif
    next file
    this just a simple looping mechanism to find files associated with your product number. Once you get that part working if you want to use it to update a table in your database you can to get image file names etc. I would avoid storing the path though because if your database and images are in the same places relative to each other you can get the 'starting' location with currentproject.path for each individual user.

  6. #6
    Tradesman is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    18
    Hi Rpeare - thats way above my pay grade - i wouldnt know where to start.
    im guessing
    would you add this to a button on a form or report to find the images??

    Im hoping to develop
    1) a screen report showing various facts
    2) a print report eg product datasheet

  7. #7
    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
    13,687
    Tradesman,

    Most of us, if not all, had no idea of where to start.
    It's a little bit like flying an airplane. If your intent is to learn "how to bank left", it helps considerably to understand some concepts of flight generally; take off, landing, a few emergency procedures ....bla, bla, bla.
    Creating a report showing various facts requires some knowledge of database concepts; tables where data is stored; names of fields that represent facts...bla, bla,bla

    rpeare has provided a basic looping construct to show the fundamentals of retrieving and displaying image file names.
    If you plan on developing this database yourself, then you'll experience loops and logic as has been presented.
    If you plan on having someone else develop your database, then you'll have to provide a more detailed design.
    One of these choices will be at your pay grade if you proceed with this database.

    Database is not something you'll learn in a day. But you have a project in mind and if you approach it positively and can supply good questions and show your work effort, forum members will advise/assist.

    Good luck.

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

Similar Threads

  1. Replies: 7
    Last Post: 04-30-2015, 01:09 PM
  2. Replies: 6
    Last Post: 02-28-2015, 10:57 AM
  3. Replies: 2
    Last Post: 08-14-2014, 10:49 AM
  4. Replies: 4
    Last Post: 04-26-2013, 07:32 AM
  5. Replies: 3
    Last Post: 02-26-2013, 04:07 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
  •  
Tech Forums: Microsoft Office Forums