Results 1 to 5 of 5
  1. #1
    kaim is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Location
    Georgia
    Posts
    8

    Still cannot figure out how to make this happen

    I wanted to make this more clear...

    I have an auto number

    ID PrevRecNum
    1 Some Data 0
    2 Some Data 1


    3 Some Data 1
    4 Some Data


    I want to be able to create an query if ID = [Some Number] I will use 1 for example i would like it to pull that record while at the same time if PrevRecNum = [Some Number] again using 1 as the example it will also pull record 2 and 3 giveing me a completed query containing racords 1 2 and 3........ I would like to be able to change the number hince the reason i used the [Some number variable] Please any help would be great. i have been at this for almost a week.

  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,931
    And what have you tried? What happened - error message, wrong results, nothing?

    Did you build a dynamic parameterized query?

    You want to pull records where the given number is the ID or is in PrevRecNum?

    Try:

    SELECT * FROM table WHERE ID=[some number] OR PrevRecNum LIKE "*" & [some number];

    I NEVER used dynamic parameterized query - I prefer http://www.allenbrowne.com/ser-62.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
    kaim is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Location
    Georgia
    Posts
    8
    i would like to pull both if 1 is in the ID field Pull the record and display

    If 1 is in the PrevRecNum field i would like it to Pull this aswell and display with the ID.


    Does this make sense?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Did you try my suggestion?
    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
    kaim is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Location
    Georgia
    Posts
    8
    Thanks so much,

    Its working like a charm.....

    *Bows* To the master

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

Similar Threads

  1. Replies: 6
    Last Post: 07-09-2015, 06:40 PM
  2. Open form suddently vanish..nothing happen
    By ultra5219 in forum Forms
    Replies: 4
    Last Post: 05-22-2013, 07:40 AM
  3. Replies: 1
    Last Post: 01-05-2013, 10:46 PM
  4. Timer Event - Why does this happen
    By Rhino373 in forum Programming
    Replies: 2
    Last Post: 05-26-2011, 07:18 PM
  5. Can't Figure It Out!!
    By jdohio5 in forum Database Design
    Replies: 1
    Last Post: 05-04-2006, 06:49 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