Opening second form based on data from selected row from first form?

adi2015

Member
Joined
Mar 4, 2015
Messages
17
Programming Experience
3-5
Hi,

I have form based on View called "Patients_list" which contains summary of patients with some basic data (ID, name, surname, date of birth etc).

I am trying to create code so that users double clicks certain ID of patient from list, new form to be open called "Patient_details" which will show all details about selected patient.

Currently form "Patient_details" shows ALL data about patients I assume that "Patient_details" must be modified so that it ONLY shows detail about patient which ID is previously selected on form "Patients_list".

Any help is appreciated and many thanks in advance!

With kind regards.
Adi
 
This really comes down to one thing: how to pass data from one form to another. You first need to decide what data to pass, i.e. does the first form already have all the data for the relevant patient and the second form will simply display it or will the first form only pass the ID and then the second form will use that to retrieve the data for itself. What data you need to pass doesn't really affect how you pass it though; whether it's a Patient object or an Integer contain an ID, the mechanism is still the same. I suggest that you follow the Blog link in my signature below and check out my three part series on Data Among Multiple Forms. The first part provides the easy option while the last part provides the proper option. Which you choose to use depends on whether it's more important to you to write your code quickly or well.
 
Back
Top