Unanswered: Set value of a text box according to typed paramater
I am doing a project for a hospital. Well I want to press a button named "Enter patient" and by pressing this a form to enter patient's personal data is opened. Then user is pressing save. Then there is a button to enter the medicines that this patient takes. By pressing the button (i have created a form, connecting with a query) is asking you to put the ID of the patient that you want to write the medicines. Now on the opened form how can I do ID field of medicines table be the same as i typed in the parameter?
E.g: I typed ID=4 and the form "Enter Medicines" in opened. Now the ID of the form "Enter Medicines" is empty. How can i do it take the number 4 or the number that I typed each time.
Thanks in advance!