Add selected records from a form to a table (1 Viewer)

Tony_Walker

Registered User.
Local time
Yesterday, 17:46
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

  • TestLab.zip
    444.2 KB · Views: 159
Last edited:

moke123

AWF VIP
Local time
Yesterday, 20:46
Joined
Jan 11, 2013
Messages
3,852
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

  • Ex_testLab.zip
    29.1 KB · Views: 152

Tony_Walker

Registered User.
Local time
Yesterday, 17:46
Joined
Sep 29, 2017
Messages
6
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:

Tony_Walker

Registered User.
Local time
Yesterday, 17:46
Joined
Sep 29, 2017
Messages
6
Thank CJ_Lodnon. My mistake!!!! Really sorry!:eek:
I mention it to my post to other forum, with moke123 solution.
 
Last edited:

Tony_Walker

Registered User.
Local time
Yesterday, 17:46
Joined
Sep 29, 2017
Messages
6
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

  • Ex_testLab2.zip
    434.2 KB · Views: 152
Last edited:

Users who are viewing this thread

Top Bottom