Increment a number in a text field

Ask a Question related to Microsoft Access, Design and Development.

  1. #1

    Default Increment a number in a text field

    I'm having problems getting a text field to automatically
    increment, exp. when you add a record to a form, it
    should automatically give a new id number, such as

    Book-001, Book-002, etc. There is a knowledge base
    article on this for Access 2000, but I'm using Access
    2002 and cannot get that one to work, as it keeps giving
    me an error, i.e., "not a defined data type". If anyone
    has any ideas, I would really appreciate it. I've tried
    searching the knowledge base for an hour, to no avail.

    thanks


    Gary Guest

  2. Similar Questions and Discussions

    1. Access update, CFLOOP, number increment
      I have a table with four columns. field0 | field1 | field3 | field10 (primary key) L ABC 101 ...
    2. 80020005 problem with Access field Types (text vs. number)
      I'm baffled... I'm just trying to update data in an access db. All works well when I have text and memo fileds only. When I change one of the...
    3. Increment row number starting at 1
      I have an asp page which displays database results in a table - (this is an invoice page). I have a variable called Row_Num which stores the row...
    4. finding a characters number in a text field
      charPosToLoc uses a number to define which character in the text field you are querying. I want to know what number char of line is in a text...
    5. Auto Increment a number field
      I have a memo field (History) and a number field (Count). What I require is that when the history field is updated then the count field will...
  3. #2

    Default Increment a number in a text field

    I am not sure I understand. Only number fields can
    increment, not test fields. If it is a number field is
    the format in the table set to "autonumber"

    Jim/Chris
    >-----Original Message-----
    >I'm having problems getting a text field to automatically
    >increment, exp. when you add a record to a form, it
    >should automatically give a new id number, such as
    >
    >Book-001, Book-002, etc. There is a knowledge base
    >article on this for Access 2000, but I'm using Access
    >2002 and cannot get that one to work, as it keeps giving
    >me an error, i.e., "not a defined data type". If anyone
    >has any ideas, I would really appreciate it. I've tried
    >searching the knowledge base for an hour, to no avail.
    >
    >thanks
    >
    >
    >.
    >
    Jim/Chris Guest

  4. #3

    Default Re: Increment a number in a text field


    Ron;
    Thanks for the help. I'll try it. This is similar to
    what a Microsoft Knowledge base suggested for 2000, but a
    bit here and there new.

    I'm not sure why its poor design. On another database,
    which uses this on Access 2000 (where it works fine), we
    have >15,000 items listed. There, instead of "Book-001",
    we use the year, i.e., "99-001"...."00-001"..... "03-
    001".....where the 99, 00, etc. are text since we (and
    our support group)couldn't figure out how to do it
    differently and still have unique coding for each sample.

    I'm trying to convert over all of these to 2002 and with
    2003 coming, well....I'm not a programmer, but it seems
    to work. The new one that I need is in 2002, thus
    the "Book-001"....



    Gary Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139