Results 1 to 2 of 2
  1. #1
    Huddle is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    318

    Want to Assign an Auto Number when there is No Bldg #

    I have a form where the Building number is the primary key. Sometimes I have to enter data before a building number is assigned and I want to have the field AutoNumber until I get the building number. I don't want to have to manually enter the "no bldg number" because I don't want to keep track of the last "no bldg number" that was entered.



    Example

    Bldg 1 is # 349752 the field would read "349752"
    Bldg 2 has no # the field would read "NN1"
    Bldg 3 is #4445 the field would read "4445"
    Bldg 4 has no # the field would read "NN2"

    Is there a way to do this?

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    This might be an indication that the building number is not an ideal choice as a primary key in your table; especially if you intend to come back at a later date to change the number. You could use auto-number as the primary key, and set the building number as an attribute (or even a candidate key).

    Cheers,

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

Similar Threads

  1. AuTo NuMbEr
    By Evgeny in forum Forms
    Replies: 2
    Last Post: 04-25-2010, 04:23 AM
  2. Auto-number
    By rkski in forum Programming
    Replies: 2
    Last Post: 01-13-2010, 02:04 AM
  3. Access Auto Number Help
    By jsmmao in forum Access
    Replies: 12
    Last Post: 01-12-2010, 11:17 AM
  4. Assign A Sequential Number To A Table Row
    By KramerJ in forum Programming
    Replies: 11
    Last Post: 04-08-2009, 08:48 AM
  5. Need help with an auto number
    By Wrangler in forum Database Design
    Replies: 1
    Last Post: 02-10-2006, 03:21 PM

Tags for this Thread

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