Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2014
    Posts
    12

    Unanswered: #Name? error when selecting dropdown field info from a relationship table

    Access 2007.

    I'm trying to associate smaller issues, handled by various departments and their own tracking, to a larger, main issue, for overall tracking.

    I have a number in this format as a primary key: EDR000#####. The EDR and fill-in zeroes are entered by input mask, allowing me to enter the last five digits and be done.

    The EDR number is one of five unique tracking numbers associated with a larger database of issues. When I try to associate the EDR number to one of the larger issues by means of a relationship and a Lookup to the EDR number column, as I'm going through the relationship building process, I get a #Name? entry in the field, instead of the lookup list of numbers for the field. Is this because I've made letters a part of the primary key with number format? Is there a way to get around this? For example, do I need to have a primary key on the smaller issues?
    Attached Thumbnails Attached Thumbnails Lookup Wizard error.PNG  

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Using an input mask or a format does not actually change the data: it remains purely numeric. If you really want to store the key value in the form of EDR00000000, use an event handler for the BeforerUpdate event to actually transform what the user typed into the formatted value that will be stored into the table.
    Have a nice day!

  3. #3
    Join Date
    Jun 2014
    Posts
    12
    I'm not sure what happened, but when I removed the EDR000##### format, used only the last five numbers as the primary key (the rest was just cosmetic padding), and reconnected the relationships for these fields, I was able to see the primary keys while using the Lookup wizard to change the field type to lookup the primary keys. I'll keep your answer in mind and post a new question based on how to use the BeforeUpdate event, should I require the padding to become part of the number.

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
  •