Results 1 to 3 of 3
  1. #1
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283

    Nested Query Question

    Hopefully I can explain this ok



    My data looks like this

    ID rep name opty name role SE name
    1 dave opty1 VP
    1 bill opty1 SE
    2 carl opty2 CIO
    2 wayne opty2 SE
    3 joe opty3 CEO

    what I woudl like to do is this......if the ID is duplciated copy the rep name field to the SE name field where the role = SE else null

    like this

    ID rep name opty name role SE name
    1 dave opty1 VP bill
    1 bill opty1 SE bill
    2 carl opty2 CIO wayne
    2 wayne opty2 SE wayne
    3 joe opty3 CEO

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Will there be only 2 records per ID?

    One approach requires a unique ID field (autonumber would serve) to create nested subquery.

    Another approach uses DLookup.
    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
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283
    Thanks I am trying DLookup now

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

Similar Threads

  1. Nested IIF Query Too Complex
    By kestefon in forum Access
    Replies: 12
    Last Post: 04-07-2014, 01:07 PM
  2. Nested And/Or query
    By kagoodwin13 in forum Queries
    Replies: 2
    Last Post: 05-10-2012, 12:10 PM
  3. Nested SQL Query
    By springboardjg in forum Queries
    Replies: 5
    Last Post: 05-08-2011, 05:01 PM
  4. Nested Query Question Access 2007
    By databased in forum Queries
    Replies: 5
    Last Post: 10-15-2010, 07:22 AM
  5. Nested IIf query will not work
    By ddog171 in forum Queries
    Replies: 1
    Last Post: 06-20-2006, 02:03 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