Results 1 to 2 of 2
  1. #1
    neo651 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    110

    Formatted AutoNumber field and combo boxes

    I've got a table that keeps track of my company's ethernet Switches. It has an autonumber field called DeviceID that is formatted to display as "SW-*".



    I also have a table called Switchports that keeps track of the ports on those switches and shows which devices are connected to which ports on the switch.

    I created a lookup field in Switchports that pulls from the DeviceID field on Switches. The problem here is that when I add a Switchport and assign it to a specific Switch using the combo box I get an error saying "The value you entered does not match the NUMBER data type in this column."

    I understand that the reason this is happening is because lookup fields look up numbers but the value being passed is now text because of the formatting. So the question I have is how do I get my lookup field and my autonumber formatting?

    Thank you.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    if you're using a combo box have 2 columns, one is the DEVICEID field from your SWITCHES table, the second "SW-" & deviceID as Device, then make bound column the first column and make it's width 0. Then when you do data entry you will only see SW-1 through SW-x but the data stored will be the numeric DEVICEID field

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

Similar Threads

  1. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  2. Pasting formatted text into memo field
    By joekuhn in forum Access
    Replies: 0
    Last Post: 07-08-2011, 02:01 PM
  3. Replies: 5
    Last Post: 07-01-2011, 11:13 AM
  4. Replies: 2
    Last Post: 08-17-2010, 02:58 PM
  5. Autofill field based on autonumber field
    By frevilla in forum Forms
    Replies: 1
    Last Post: 09-11-2009, 02:50 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