Results 1 to 4 of 4
  1. #1
    Advanced is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    2

    How to Increment A Number Field

    Hi,

    This is my first post on here, so here goes.

    I was handed a database that has been assigning a field "Item Number" by manually typing in a number (2009xxxx, ie, 20090233). On the table, that is the name of the actual field(with the space).

    What I want to do is this:
    Add a button. The button does the following:
    1. Fills in the "Item Number" field for that entry using the NEXT sequential number, prefixed by 4 digit year).
    2. Disables itself once that "Item Number" is filled by clicking it.

    I'm an amateur at this, not a professional programmer. I can figure out where to insert code, however, what to type is beyond me.

    Any help is appreciated.

    Thank you in advance.

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    This is a little complex.

    See attached sample.

  3. #3
    Advanced is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    2
    Hi,

    I was thinking more along the lines of this:

    http://www.databasedev.co.uk/automat...ent_value.html

  4. #4
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    What you linked to is fine in a single user environment, and to quote them.

    << It is worth mentioning that this method has limitations in a multi user environment. You run the risk of 2 (or more) users getting the same number if they're trying to add records at the same time. If you don't have multiple people entering data, then it won't be a problem. >>

    But in a multiuser environment mine will work where their's won't.

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

Similar Threads

  1. Field displays number instead of value
    By rdueck in forum Reports
    Replies: 6
    Last Post: 02-25-2010, 08:19 PM
  2. Replies: 2
    Last Post: 12-08-2009, 01:19 PM
  3. Replies: 12
    Last Post: 08-09-2009, 07:35 AM
  4. Report the number of occurrences in a field
    By ecpike in forum Reports
    Replies: 1
    Last Post: 05-05-2009, 01:57 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