Add selected records from a form to a table

Tony_Walker

Registered User.
Local time
Today, 15:40
Joined
Sep 29, 2017
Messages
6
Dear Access experts!
In my database, i ve created a form to add exams. As you can see to forms,i added on form caled select (it is a multivalue field from edapy_exams)
- What i want to achieve is to add a button so selected exams from ths form, append to table Patient_order_exams, linked with patient_order_id. This way user has a litle chance to add the same exam twice.
- I wonder if there is a way to prevent user to add the same exam twice to patient_order_exams (per record)
I think this will help and other users to append records, and make db look nice and ... tidy
Thank you
 

Attachments

Last edited:
I wonder if there is a way to prevent user to add the same exam twice to patient_order_exams (per record)

Heres one example on how to exclude an item from the list if its already been selected.
 

Attachments

Heres one example on how to exclude an item from the list if its already been selected.

I think this is a very good solution. I will test it! If it works, i will uplaod the db working so other users can see it work. In my db must be linked to order and not to patient.
 
Last edited:
Thank CJ_Lodnon. My mistake!!!! Really sorry!:o
I mention it to my post to other forum, with moke123 solution.
 
Last edited:
Heres one example on how to exclude an item from the list if its already been selected.

Moke123 i ve tried a lot but ... i couldnt much it to my db... my knolege is limmited... Thank you anyway, i really think this is the way. The only thing that needs to be changed is to take the order id.. from somewhere and not from a dropadown list, so the selected exams will be the records of Patient order exams. Like the link you have posted, i ve changed the patient with Patient_order to match with my db and the other table was edapy_Exams, the join table for me is Patient_order_exams. ... and then i lost it!!!
I really need somebodys help with this part.. if you like.
Because i dont know how to handle macros, i cept the names you gave. When you try to add without an id sows message,which is correct. What i couldnt do is to change combo2 so it could be linked with the open patient order (patientid for your example)
You can see the relationships and understand what i mean.
Anyway thank you very much for the idea, you are great!!
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom