linking forms - one to one relationship

alberon

New member
Local time
Today, 21:49
Joined
Dec 9, 2002
Messages
5
Hi,

I'm asking this question on behalf of a student doing an A level project for a dentist's surgery.

He has two tables which are linked one to one : patient and patient details. I guess they could be combined into one table, but as the second table is very long, he'd like to keep them separate.

There are two forms corresponding to the two tables : and he'd like to be able to open the patient details form from the patient form. This works, but all records in the patient details table are visible on the patient details form. How can he send in a parameter (or similar), so that only the related patient details record is visible?

Many thanks for any help ....

Tim
 
When you say 'Patient Details' do you mean their address, phone number etc, or do you mean treatment they've had (history)?

If it's history/treatment, I guess he should have a one-to-many relationship as the patient can have more than one lot of treatment. He should have a PatientID number, and this would link the patient to their history. If that was the case, I'd suggest that his patient form has a subform control in it, and the subform to appear would be the 'patient details' form. Then he can just link them with the PatientID.

If the 'patient details' mean address etc, I am a little confused as to your post, as you have implied that there are more patient details than patients. If that's correct, why is it one-to-one?

I hope this is of some help - maybe if you explain a little further, I can be of more use.
 
I take it that you have a button or are double clicking on a patient record to get to the detail screen.

You can apply a filter to the patient detail screen using the patient id selected on the primary screen.

Or you can specify linking criteria to the bound object of the patient detail screen. e.g.

If your primary screen has a field called 'Patient Ref' which is the primary key (unique) of the patient record set then use a query to call patient details in the second screen and apply the criteria to the matching patient ref field as follows'

forms![primary screen]![patient ref]

If you have enough room on the primary screen why not add the patient detail as a sub form with the 'patient ref' as the parent \ child link?
 

Users who are viewing this thread

Back
Top Bottom