Results 1 to 6 of 6
  1. #1
    markw is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    5

    Auto increment a number and be able to modify value after increment has taken place.

    Background:



    I work in a IT department that support around 200 desktop/laptop computers (PC's and Mac's) and up until now we have been basically using
    Excel to keep track of the computers. This works as we don't get a lot of change in ownership of these systems, but I'd like
    to start using Access so we can get better reports as to units.

    We use a specific naming scheme that I would like to continue to use, I just don't know how to do it and I'm hopping some one here
    will know how to accomblish it.

    We name our computers, in this form (changed here from what they really look like) but you'll get the idea.

    A desktop would look like med-it-234 and a laptop lets say would look like med-it-235L our macs are named like med-it-236m

    So the question is, How do I auto increment a number and still be able to add on information to that number, like give me med-it-237 and allow me to add lets say an 'L' to the value. I don't even need the "med-it-" part, just the number.

    Thank you for any help you might be able to offer.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You can display this "number" any way you want but have you considered using more than one field for the "number"?

  3. #3
    markw is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    5
    Quote Originally Posted by RuralGuy View Post
    You can display this "number" any way you want but have you considered using more than one field for the "number"?
    Could you give me an example of your thought?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    med-it-236m
    .
    It looks like the RED part is fixed but can easily be in a separate field if it changes occationally. The ORANGE suffix can also be it it's own field. That leaves the BLACK number as the only incrementing value and simplifies your issue.
    Field1 & Field2 & Nz(Field3) would put the three fields together for whatever need you might have.

  5. #5
    markw is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    5
    Ah ok. Good suggestion, didn't even think about splitting the whole name into two separate fields (first part as you point out is really 'static' and I'm not counting that as a field).

    Thank you for the suggestion.

    Mark

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great Mark. Are you ready to follow the link in my signature and mark this thread as Solved? (no pun intended)

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

Similar Threads

  1. Renumbering Auto-Increment numbers
    By svcghost in forum Database Design
    Replies: 8
    Last Post: 02-19-2011, 08:48 AM
  2. Auto Increment by 1 Letter
    By Cinquefoil22 in forum Database Design
    Replies: 4
    Last Post: 07-02-2010, 10:35 AM
  3. Auto increment when the form opens
    By Lynn in forum Forms
    Replies: 13
    Last Post: 04-11-2010, 12:49 PM
  4. Replies: 2
    Last Post: 12-08-2009, 01:19 PM
  5. Auto-increment for non-100% numerical fields
    By supernoob in forum Access
    Replies: 0
    Last Post: 05-03-2007, 09:44 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