Results 1 to 3 of 3
  1. #1
    TaSMaNiaC is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    1

    Question Creating an unique ordered number field with auto shifting values.


    Hi,

    I'm creating a database using existing data from an excel file full of contact details. What I need to add is a queue type system where each contact in the database has a "Place in Queue" number which is unique obviously. Lets say Alan is number 1, Bob is 2 and Chris is 3. They have these corresponding numbers in the queue field for their entries. Now what I need to have, through use of a form, is a way of changing Chris from number 3 in the queue to number 1 and thus have Alan automatically shift down to number 2 and Bob to 3. I hope I've described this properly and it makes sense. I've been tinkering around trying to figure this out but I have no clue how to actually achieve this. Could anyone be as helpful to point me in the right direction?

    Thanks in advance!

    Tasman

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    You may get away with an update query which adds One to each record within that set of records. You do have a start and finish value.

    If that doesn't work then you are going to need some VBA code, to loop through the affected records.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    You say you need a form and some method to change the various positions in the queue. Do you have an algorithm for these queue position changes? I think that's where you have to start.

    Do you need to -
    -add a new person in the queue, and requeue
    -remove any one or many from the queue and requeue
    -randomly modify the queue
    -???

    What exactly are you trying to do -- in plain English?

    If you can't define/describe it, you'll have a hard time doing it.

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

Similar Threads

  1. Null value in an auto-number field
    By mharkin in forum Import/Export Data
    Replies: 9
    Last Post: 10-03-2012, 07:43 AM
  2. Auto number a field
    By jenncivello in forum Access
    Replies: 2
    Last Post: 11-16-2011, 11:28 AM
  3. Auto Unique Number on every REPORT
    By imvineet in forum Access
    Replies: 3
    Last Post: 09-09-2010, 08:08 AM
  4. Replies: 24
    Last Post: 09-01-2010, 02:09 PM
  5. Creating a unique ID for a new set of values
    By slaterino in forum Programming
    Replies: 1
    Last Post: 08-24-2010, 09:35 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