Results 1 to 5 of 5

Thread: Access - find records from list

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Location
    England
    Posts
    234

    Access - find records from list

    Hi,

    I'm guessing this is really easy, but i'm completely new to access/sql.
    I have a list of Case ID, from a specific area.
    and i want to run a query to pull back info on the cases in the list.
    at the moment i am inserting into cells in excel:
    =A1&" or "
    =B1&A2&" or "
    and dragging these formulas down then copying the values in to my access query
    the above method is limited as the query will only allow me to insert a certain number of characters, so it's a complete nightmare shortening the formula down every 40 or so cells
    especially when i have over 2000 cases
    i'm guessing there is an easier way
    ie just pasting the case ids using the "IN" operator in SQL
    so i'm hoping one of you guys could help me, and show me a tut or a solution to my problem

    many thanks

    Mitch
    Last edited by Mitch_s_s; Aug 2nd, 2007 at 10:00 AM. Reason: Incomplete Title

  2. #2
    Addicted Member
    Join Date
    Nov 2006
    Posts
    170

    Re: Access - find records from list

    what is it that you need to transfer your data to excel to accomplish? Can you post some of your existing code? The query code thats only allowing 40 chrs?
    You're the King? Well I didn't vote for you...

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Access - find records from list

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Location
    England
    Posts
    234

    Re: Access - find records from list

    Thanks for your response

    it's basically, when i go in to design view for my query
    i want to be able to search for more than approx 25 cases at a time
    each case id is 11 digits long, so i put in to the criteria section of the query
    "12345678912" or "12345678913 or" etc

    what i want to be able to do is paste the whole list of case id's that i have, in to the query instead of having to do multiple queries

    i will look at your links posts rob,

    Thanks again
    Mitch

  5. #5
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: Access - find records from list

    1. Create a Search Table with only one field ID with the same data type as in Main Table.
    2. Paste all IDs you want to search for into ID field of Search Table.
    3. In design view of the query, add both tables then join two ID fields of them by draging one to another.
    4. Select all the fields from the Main Table you want to display.

    By this way you can have as many as IDs you want to search for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width