Results 1 to 5 of 5
  1. #1
    John-n is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    3

    force the auto number to change according to the filter applied on the table

    hi i have a table and it is like this 1 a 2 b 3 f let's assume i want to add new data {C} so it will be like this 1 a 2 b 3 f 4 c is their any way i make the table look like this 1 a 2 b 3 c 4 f can i force the auto number to change according to the filter applied on the table is their a numeric field can be used instead on auto number that can be changed according to the filters

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    If you are really using an automumber field, then no, you can't change it. All autonumbers really do is give each record in a table a unique ID number, and they should not really be used for anything other than that.

    In your case, I don't see what the issue is anyway; all you need to do is sort on the second field and you will have what you want.

    Am I missing something?

    John

  3. #3
    John-n is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    3
    thanks for your reply John can i use a another kind of numeric field rather than auto number i have built my data base depending on a numeric field but auto number won't help me specially when i will add new data to the base so i need a numeric field that will remain the same no mater what the filter i apply on the table is this possible there is an example on how i am using the auto number field
    Attached Files Attached Files

  4. #4
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    "i need a numeric field that will remain the same no mater what the filter i apply on the table"

    I think you are misunderstanding how autonumber works. Autonumbers (real ones) do not change once assigned; they remain the same regardless of the filter or sorting applies to the table or form. Autonumbers are called that because they are generated automatically by MS Access, and are useful because they are guaranteed to be unique within each table. and they cannot be changed. They should not be mistaken for a "record number" - there is no such thing as "record number" in Access.

    With regard to your original question - can the autonumber be made to change according to filter or sort order - No. Is ther another numberic that can be made to change according to the filter or sort order? Again No, not without using VBA.

    HTH

    John

  5. #5
    John-n is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    3
    thank you very much for your answer John can you help me with the Vba code (:

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

Similar Threads

  1. Replies: 2
    Last Post: 06-10-2012, 10:25 PM
  2. Table auto number issue when getting to 10000
    By shabbaranks in forum Access
    Replies: 11
    Last Post: 05-18-2012, 10:14 AM
  3. ODBC Call Fail - Only when totals applied
    By wvuatrrd in forum Queries
    Replies: 3
    Last Post: 11-04-2010, 12:52 PM
  4. AuTo NuMbEr
    By Evgeny in forum Forms
    Replies: 2
    Last Post: 04-25-2010, 04:23 AM
  5. How to open a form with filter applied?
    By rkm360 in forum Access
    Replies: 1
    Last Post: 03-18-2009, 09:27 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