Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Zetheroth is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    31

    Question Adding alternative names that mean the same key

    I've got an issue where certain users of the document put the names differently no matter how I try and tell them it will change, is there any way to assign 2 names to equal one key?

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,144
    If this is on an access form, use a combo box to restrict their available options.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Zetheroth is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    31
    It is in a combo box, but they just added another name to the list, which causes the system to think that the same buyer is actually 2

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,283
    So is that via the NotInList event? or do they go to the buyer form and deliberately add the same buyer?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,235
    The answer is yes, you can create new table to hold the association (AutoID_PK,ProperName, AlternateName) and link that in your queries (link AlternateName to Name in current table and apply criteria to ProperName).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  6. #6
    Zetheroth is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    31
    ya they were deliberately adding a buyer, but ive got my answer on how to fix it now, Thanks everyone

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,283
    Going to be a task assigning fake names to the real name,surely?
    How do you work out what the real name is?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    Zetheroth is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    31
    its all stored down to a primary key number anyways, and the main name will be the one in the primary row, with a secondary and tertiary row for anyone who uses more than one name

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,283
    If that was me, I would probably start storing the user name of the creator of the record and then be having words.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    I agree with the solution offered by vlad. And, further to Paul's recording some names and having a talk, when people can add "junk/fake" values contrary to instructions, that is a management issue rather than a technical issue. Often corrected through some training or adjusting program logic/validation to prevent/restrain unwanted values.
    We've all experienced some form of this, so it isn't new ground.

  11. #11
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Isn't this a simple matter of setting Limit To List = Yes?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  12. #12
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850

  13. #13
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,235
    Post # 3:
    It is in a combo box, but they just added another name to the list,
    Post #6:
    ya they were deliberately adding a buyer
    Sorry but I don't think so, the OP says the users are deliberately adding the name to the list (table), so it will be in the list and not restricted by the LimitToList.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  14. #14
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    You clean up the list and leave in the valid values. Then they can't add whatever they want after that. Or is that not what is wanted?
    This is being done in a form, not a table? It was asked but not answered. Saying it's being done in a combo doesn't answer that when table lookup fields can present combos too.
    It is in a combo box,
    Besides, if OP has a solution as per post 6, why did I even bother to raise the question?
    Last edited by Micron; 11-18-2022 at 01:23 PM. Reason: added comment
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,235
    I wouldn't know were the new entries are done but to me being done "deliberately" would signal that the users wouldn't stop once the list was "cleaned", they'd find a way to add them again.

    And I believe the solution mention in post 6 was referring to the one I offered in post 5, but again, not a mind reader so only the OP would know for sure .

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Adding sheet & file names to Excel import
    By sportyaccordy in forum Import/Export Data
    Replies: 2
    Last Post: 03-05-2019, 10:37 AM
  2. Replies: 7
    Last Post: 03-21-2018, 04:58 AM
  3. Replies: 2
    Last Post: 01-08-2018, 06:23 PM
  4. Replies: 11
    Last Post: 10-30-2016, 05:39 AM
  5. Replies: 5
    Last Post: 04-24-2011, 03:14 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