Results 1 to 4 of 4
  1. #1
    jurbin is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2014
    Posts
    15

    Remove Records based upon 3 columns and return based upon choice of one or the other

    Hello,



    I am working with a data set where someone reviews a work item and approves it where it then moves to the next step in approval. There are several status' someone can choose, but only certain ones move it to the next queue.For instance, possible choices could be - 'approved' 'IGO' 'NIGO' 'On Hold' but only 'Approved' would move it to the next queue. Sometimes people are confused because 'IGO' and 'Approved' are essentially the same thing, so they will press 'IGO' then realize it didnt move and press'Approve' where it then moves to a new queue. Since I know that ANYTIME this happens, in the same queue it is a mistake, could I create a formula in a query where I say something like "If 'IGO' and 'NIGO' appear for the same [Event Operator ID] in the same [Event Queue] for the same [Work Item Number] the record with 'IGO' should be removed.

    Please see attached picture of my column names so you can understand what I mean with the above. Any help would be sincerely appreciated.

    Click image for larger version. 

Name:	111111.png 
Views:	12 
Size:	3.4 KB 
ID:	23177

  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,770
    Show some example data of this situation.
    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
    jurbin is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2014
    Posts
    15

    Reply to question

    Quote Originally Posted by June7 View Post
    Show some example data of this situation.
    Thanks, attached is a sample of what the duplicate might look like but the only item that's different is in column 'event status' one says "IGO" the other says "Approved" I want to automatically remove the IGO line IF something looks duplicated like this except for those two status' in 'Event Status'


    Click image for larger version. 

Name:	exampleforAccessForum.png 
Views:	5 
Size:	4.7 KB 
ID:	23211

  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,770
    This means selection of a record is dependent on value in another record. Not simple. This calls for nested subquery or domain aggregate (DLookup).

    For nested query, review http://allenbrowne.com/subquery-01.html#AnotherRecord

    However, this is complicated by the IF condition because you also want the IGO records if there is no Approved. I am sure similar requirement has been discussed before but cannot remember the solution. Makes my head spin. Will have to do some testing but that is not much of a data sample to work with. Want to attach a spreadsheet of records or even the db? Follow instructions at bottom of my post.

    Is it possible to have another record with same WorkItemNumber but maybe another field with different value, say ItemSubtype?

    Just how do these 'duplicate' entries get created? Would be better to prevent this up front.
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-06-2014, 01:25 PM
  2. Replies: 9
    Last Post: 08-19-2014, 12:41 PM
  3. Replies: 6
    Last Post: 04-06-2013, 10:36 AM
  4. Replies: 2
    Last Post: 03-07-2013, 03:14 PM
  5. Replies: 5
    Last Post: 10-08-2009, 05:15 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