Results 1 to 6 of 6
  1. #1
    Tomfernandez1 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    74

    Number Field to Alphanumeric Field

    Hi,

    I have a form with an "EmpID" number field that accepts unique values only. The EmpID field setting in the source table is set to Long Integer and no duplicates. I was asked to change allow users to enter "T" before the EmpID number, for example T2004, but I would have to change this field to a Text field. Is there a way around this? I have set up table relationships behind the form so making a change to a Text field doesn't seem ideal.
    Any advice is much appreciated!

    Thank you.



    Tommy

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    The only way around it I can think of is adding a field for the prefix and let the user add it separately. You can concatenate them together on reports and such.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Tomfernandez1 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    74
    Quote Originally Posted by pbaldy View Post
    The only way around it I can think of is adding a field for the prefix and let the user add it separately. You can concatenate them together on reports and such.
    Thank you for the response.. I also have a search form that uses the EmpID field as a search criterion so how might the concatenated EmpID affect this?

    Tommy

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If the numeric part will continue to be unique, you can just let the user enter that part and let your search work as it currently does. Another solution would be creating a calculated field in the table that concatenates them, and use that for the search.

    Or, bite the bullet and change the field to text in this and related tables. This seems like one of those situations where there might be 10 different solutions, and you're probably best positioned to choose the appropriate one based on your knowledge of the "big picture", the users, etc.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Tomfernandez1 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    74
    Thank you pbaldy!

    Tommy

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem. Post back if you need more thoughts; one of us can probably come up with several solutions you can pick from.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 07-15-2019, 05:55 PM
  2. Split alphanumeric field
    By aswin34 in forum Queries
    Replies: 3
    Last Post: 09-11-2015, 08:37 AM
  3. Replies: 9
    Last Post: 11-14-2014, 06:11 PM
  4. Sorting by alphanumeric field
    By RonL in forum Access
    Replies: 1
    Last Post: 10-20-2012, 05:06 PM
  5. Format a field(AlphaNumeric)
    By Bakar in forum Database Design
    Replies: 1
    Last Post: 12-20-2010, 06:36 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