Hello my friends!
As I recently posted my first thread here, I was quite grateful that other's are willing to help. I have a new question and in order for you to better understand what the problem is, I wanted to take care of a suggestion that was made in my first thread which is showing my database.
Introduction:
I have three tables: Persons, Codes and PersonCodes. In my case, one Person can have one or more Codes and one Code can be assigned to one or more Persons, so it is a classical M:N relatioship.
I was doing some research and understood that if you have a M:N relationship, you need a third table which is the so called "Join Table" if I'm not mistaken. I also implemented the join table "tbl_PersonsCodes" which has an 1:n relationship (Persons:PersonsCodes) and n:1 relationship (PersonsCodes:Codes). See the screenshots below.
Here is my problem:
I would like to implement a form which can assign each Person one or more codes and which immediately shows in the current form which codes (that could be selected in a list) are left and which are selected for person.
I am also showing my form with the combobox because the idea is that I am also able to select one Person via the combobox drop down menu and do it for this specific person.
I am not quite sure how I can get this done. I did some research and came across: Lists / Listviews / MultiSelect / Listboxes.
I am also not quite sure about my join table "tbl_PersonsCodes" because it has only the primary keys of "tbl_Persons" and "tbl_Codes" as foreign keys. I also provide a screenshot of this. The way I did it is definitely not the way I want it to get it done. It's quite "pragmatic".
I would be very grateful for help and also a little more detailled explanations and maybe a few hints for why it is a good choice to implement it this way. Thank you! And have a nice day
MY CURRENT DATABASE
With a form, I managed to implement a combobox to search Persons and to show them in the detail section below after update and I was also able to implement a button with which you can export data to a word template.
My current DB consists of 3 tables and a few forms. See the screenshots attached.
Greetings,
FinisherProgrammer21