Dropdown selection that disappears

Solved
MathisLRN Posted messages 17 Status Member -  
MathisLRN Posted messages 17 Status Member -
Hello,

As part of my internship, I need to create data entry forms in different tables, and everything works from there. A problem arises when I select an item from a dropdown list. Once selected, the choice disappears (only in the display) but when I add the new entry, the choice made in the dropdown list is indeed present in the table.

The problem is just the disappearance upon selection of the chosen item. Do you have a way to keep the selection displayed in the list?

Thank you, I'm linking: https://cjoint.com/c/HFwnZXc0wsw; my Access file, it concerns the form for adding compatibility (F_Ajout_Compatibilite), the field "Product Version" that is problematic.

1 answer

  1. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   Ambassadeur 1 588
     
    Hello, it's line 3 in the following code that is responsible for this.
    Private Sub VersionProduit_AfterUpdate() Id_Version = VersionProduit.Column(0) VersionProduit = Me.VersionProduit.Column(2) VersionPro = VersionProduit.Column(2) End Sub

    Additionally, I recommend adding "option explicit" at the top of the module, you will see that VersionPro does not exist.
    0
    1. MathisLRN Posted messages 17 Status Member
       
      Thank you, I hadn't noticed. However, even after removing line 3 and adding "option explicit," the selection disappears once again.
      0
    2. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   1 588 > MathisLRN Posted messages 17 Status Member
       
      maybe you didn't save the code changes?
      0
    3. MathisLRN Posted messages 17 Status Member
       
      Yet, strange...
      0
    4. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   1 588 > MathisLRN Posted messages 17 Status Member
       
      Can you share your corrected file?
      0