Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2008
    Posts
    3

    Select "autonumbers" not in sequence

    Looking for a way to select certain records out of a data base that has an "Autonumber" field, and a "First name" and "Last Name".



    Criteria: When I try ="1", "5", "12" etc. (the "AutoNumber" field) it doesn't work

    When I try Like "1", "4", "9" etc. it doesnt' work

    What is the proper expression to select records using the "AutoNumber" as the field to use to base the select on?

    Thanks!

    Jerry525

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    An AutoNumber field is a Long Integer numerical field, not a "text" field. Drop the quotes.

  3. #3
    Join Date
    Nov 2008
    Posts
    3
    Thanks Ruralguy

    I tried dropping the quotes and still no success


    Like 1, 3, 7

    = 1, 3, 7

    etc. etc.

    Can you use the three records above and type in the criteria that will return those three records in my query?

    Thanks!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You will need to OR them together. How about posting the SQL view of the query?

  5. #5
    Join Date
    Nov 2008
    Posts
    3
    RuralGuy

    Like 1 or 2 or 5 etc etc

    Thanks! That worked.

    jerry525

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Thanks for posting back with your success.

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

Similar Threads

  1. Access 2003 Date() Function returns "#Name?"
    By smartel@soprema.ca in forum Programming
    Replies: 5
    Last Post: 01-18-2012, 05:52 AM
  2. Replies: 0
    Last Post: 09-25-2008, 12:19 PM
  3. Export to .rtf of "104-" converts to "-655&qu
    By Sherri726 in forum Import/Export Data
    Replies: 0
    Last Post: 12-19-2006, 03:16 PM
  4. Replies: 2
    Last Post: 08-31-2006, 12:19 PM
  5. "Count" and "Countif" in Reports
    By JMantei in forum Reports
    Replies: 1
    Last Post: 06-20-2006, 02:20 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