Results 1 to 5 of 5
  1. #1
    annux3 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    8

    Finding value from a range and if not match then find next

    Hello,

    I have a table that contains passive and active devices. I want to find correct active device to which passive device is connected. However passive device can be connected to another passive device and after that to an active device - could be endless times a passive device is connected to passive device and then in the end to an active device.

    I will include excel tables with data and wanted result.



    The criteria is i think something like this:

    TYPE IS D3P AND Mark DOES NOT CONTAIN "ZUUM" AND Sort IS "Passive"

    I have no idea how to put that into query or if its even possible to do with query?
    I got the result via doing excel function index-match for like 5 times and excel stalling.

    Any ideas? or questions?

    Thank you,

    A.
    Attached Files Attached Files

  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,633
    Maybe:

    SELECT * FROM tablename WHERE [TYPE] = "D3P" AND NOT [Mark] LIKE "*ZUUM*" AND [Sort] = "Passive"
    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
    annux3 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    8
    Thats the 1st part of the query I think. now that all wanted passive devices are found I need to find active device for them - taking dev_id from passive device row and searching it from all the IDs, if found ID has "active" in its row then its a match, if it has passive then it takes on this row dev_id and searches for the next one.

  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,633
    I expect that will require VBA procedure.
    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
    annux3 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    8
    I will move this to the VBA/programming section then. Thank you.

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

Similar Threads

  1. Replies: 6
    Last Post: 06-27-2015, 01:38 AM
  2. Replies: 11
    Last Post: 02-06-2014, 10:05 PM
  3. Replies: 14
    Last Post: 05-09-2013, 06:53 AM
  4. Trouble finding closest match
    By cutsygurl in forum SQL Server
    Replies: 1
    Last Post: 02-22-2013, 03:59 PM
  5. Finding data that doesn't match
    By dlhayes in forum Queries
    Replies: 1
    Last Post: 11-11-2006, 08:14 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