Results 1 to 5 of 5
  1. #1
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287

    Searching through list of files to match with list of SKUs

    Hey guys,



    I have been on this program for a week now and I have just hit a bad road block.

    I have a table, that is pulled from ODBC, that lists all of my company's active packages. A package is 1 SKU that when typed into our point-of-sale system "explodes" into the individual SKUs that make up the package. For example, the PKB213QSB (B213 queen sleigh bed) explodes into B213-51 (headboard), B213-71 (footboard), and B213-94 (rails). These packages are created by my company.

    I have another table, that is pretty much static. The manufacturer's pictures of their products get pulled from their FTP once every 3 months to our server. I have a small .exe program that creates a list of the files in that folder of the server, as well as attaches a URL to them. The pictures are labeled oddly.

    Packages: Click image for larger version. 

Name:	packages.jpg 
Views:	14 
Size:	50.3 KB 
ID:	13803 Picture list: Click image for larger version. 

Name:	dirlist.jpg 
Views:	14 
Size:	96.3 KB 
ID:	13804

    This pictures give you an example of what the tables look like. The packages table lists the package sku, then the individual skus in that package. The next two columns are what I was working on: it separates the individual item (the last 2 numbers of our SKU) from the series. The directory table fields list a series, then a "-", then each of the items in that picture all separated by "-".

    What I want is to link a picture to a package in a form. This will make a sort of catalog that I can quickly flip through. Once I get these linked, I can bring over a whole bunch of other data that I need (stock, pricing, back orders, etc).

    Some of the pictures will contain most of the items in the package (not always all of them) and some will have even more items. Example: There isn't just a picture of the PKB213QSB that I mentioned, but there is a pic that includes the bed, nightstand, dresser and mirror.

    Any ideas on how I can make a search that determines the best way to do this?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    It appears the URL has the Series and Item number embedded, and think I see examples with multiple Items in the URL. Seems to complicate but the hyphenation might be quite helpful. To retrieve the URL with the ActivePackage record in a query or on a form or report, try a calc like:
    DLookup("URL","Dirlist","Left([filename],5)='" & [Series] & "' AND [filename] LIKE '*-" & [Item] & "*'")

    Review these articles about hyperlinks:
    http://allenbrowne.com/func-GoHyperlink.html
    http://www.allenbrowne.com/casu-09.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.

  3. #3
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    That was definitely a fantastic start! Thank you so much!

    I can't really decipher what your criteria is doing in there though. Think you could put it in plain English for me?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Translation of the DLookup expression:
    Find first record in Dirlist where the first 5 characters of [filename] are equal to the value from [Series] AND [filename] contains the value from [Item]. I concatenate a hyphen in front of [Item] value so the characters won't match to characters in the Series part.
    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
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    Ah ok, that makes sense. Thank you again. I tweaked it a bit and is doing what it should! I appreciate all the help!

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

Similar Threads

  1. list files recursively and store results in array
    By maxbre in forum Programming
    Replies: 2
    Last Post: 11-10-2011, 01:49 AM
  2. Match List to Master Record
    By mediaguy28 in forum Queries
    Replies: 2
    Last Post: 10-17-2011, 05:48 AM
  3. Searching for match in table
    By pdxengruser in forum Queries
    Replies: 1
    Last Post: 08-05-2011, 11:56 AM
  4. Populate Combo Box with list of files
    By jgelpi16 in forum Programming
    Replies: 1
    Last Post: 02-22-2011, 09:28 AM
  5. How To View List of Files in Box
    By treyprice in forum Forms
    Replies: 3
    Last Post: 01-14-2010, 03:40 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