Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jan 2008
    Thanked 0 Times in 0 Posts

    Selecting 1000 records (AccessXP)

    I have a query that returns 4000 records. I would like to write some code to save the first 1000 records to a file, the next 1000 records to another file, and the next 1000 records etc...
    How do I select the 1000 records only?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Selecting 1000 records (AccessXP)

    If your query contains a field with unique values, lets, say F, you can create a query based on the original query that adds a sequence number:

    SeqNo: DCount("*", "QueryName", "[F] <= " & [F])

    You can set the criteria for this column to <=1000 and export.
    Then set the criteria to Between 1001 and 2000 and export, etc.

    If you really want to use code, what kind of file would you like to save to?

Posting Permissions

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