Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Pass Criteria from Disk File (Access 97 SR-2)

    What is the procedure to pass criteria from an Excel or CSV file into an Access query?

    Thanks in advance,
    Arcturus16a

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Pass Criteria from Disk File (Access 97 SR-2)

    I don't understand the question?
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Pass Criteria from Disk File (Access 97 SR-2)

    I have a list of account numbers in Excel that I want Access to query. The list is 179 accounts long. Can I save the list as a CSV file and point some Access reference to the disk file to read the list of account numbers to query.

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Pass Criteria from Disk File (Access 97 SR-2)

    You could do this one of three ways:
    1. Link to the Excel sheet .
    2. Output the sheet to a CSV file, then link to that file.
    3. Import the sheet into an Access table.

    It's up to you how you do it.

    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Pass Criteria from Disk File (Access 97 SR-2)

    Thanks, but I'm a novice. Can you step me through the process. I've created a table with only one field which contains accounts numbers. A query is written where I can manually enter the account numbers, but there are about 180 accounts that I'd like to query at the same time and this is only the first step of many in my project.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Pass Criteria from Disk File (Access 97 SR-2)

    Lets call the table where you have defined one field (account number) as the accounts table.
    How often do you want to change the list of lookup account numbers in the accounts table?
    Is it every time you want to run the query? Or do you just need to make a few new entries or delete existing accounts from/to the accounts table to query.
    With the accounts table which holds the account numbers you can join this to the table in the query so that it only selects records that are in the accounts table.

    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Pass Criteria from Disk File (Access 97 SR-2)

    Thanks Pat for your help. I tried it from a table and it worked on my first try.

Posting Permissions

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