Opening from a Master/Detail form to other

ritchie_h

Registered User.
Local time
Today, 12:49
Joined
Oct 3, 2009
Messages
22
Hi

I am using access 2007 to create a database to manage patients.

I have a Company List which opens a Master Detail form for each listing the Patients for that Company this form is call Patients List Main.

Patients List Main now in turns open a Master Detail form for each patient.

Then each Patient will open another master detail from for thier prognosis and diagnosis.

The problem i am having is when I am opening the Main Form or Main Table Primary Key is not linking. I am attaching the database here to see if someone can help i think i tried well all that i know and now seeking help.

Not to sure if it can be down.


Tables
Company (Primary key: COMID)
Patients (Primary key: MMID)
Patients Various Test

Forms
Company
Patients List Main =(each Patient)==> Patient Details Main

When opening the Patient Details Main for a new Patient the COMID and MMID its not linking and its not working when I try to edit a patient as well.

So i am attaching the file to see if someone can help me. I am desperate.

I tried another forum but that did not help but this one came highly recommended on the net so i hoping it works out for me :D

Thanks in advance for your efforts and help.




 

Attachments

Everyone be aware that the attached file is in Access 2007 format.
 
Any luck, or its not feasable, or it cannot be done....HELP!!
 
I am lost
Take me through step by step please

I have got your db open - just cant seem to find the issue
 
Open Main Form
Click on a Company Then click Patient List
here is where i have my problem now
When i click on the MMID for to edit each patient i want it to open the form Patient Details Main linking the COMID and MMID

When i click on New Patient I want it to add to the current COMID using the form PAtient Details Main

thats pretty much it
 
i was trying a lot of things soo it not working properly but the closest i got was if you used the Patients Details button it would open the Patient Details Form but it only bring up the last record that the onFocus record.

Also if I click Save and New on the PAtients Details record it not carrying over the COMID, and i cannot seem to find a way to link Master and Child fields using this format of the form.

I hope you understand
 
Ok so i got the save and New to work by adding by link between Master and Child fields in the PAtients Details Main Form
 
No Luck DCB
Sorry - Saw that you were offline then didnt see your replies

You would carry the ComID with Open Args as its not really a link

I have a question though - WHY - are you trying to carry the COMID through to all your records?
 
The more I look at the design I have a few questions:
You have
Company 1 -> M Patient
Patient 1 -> M TestTables

Yet in all your sub tables below Patient you are trying to carry COMID I can only assume that the reason for doing this is that
1 Patient <> 1 Company ie. The same patient could concevibly be tested via 2 companies?

You should look at this carefully if I am right - before I type a page of suggestions tell me what you are thinking of - ie flow of the app
 
I trying to carry the COMID through all the records because each patient is linked to that company and only that company

if that patient changes to other company I will used a transfer macro to move that patient to that said company
 
I trying to carry the COMID through all the records because each patient is linked to that company and only that company

if that patient changes to other company I will used a transfer macro to move that patient to that said company

And that will change all the old records accross to the new company? You dont need to hold the history under the old company?
 
No I don;t need to hold the history under the old company and yes it will transfer all the old records to the new company
 
Then you dont need COMID in these tables - only in PatientID

Company is linked to patient
Patient is linked to everything else

There is no need to try and hold the COMID in every table - your relationships have done this anyway

Make sense?
 
also means you dont need to use a macro to change companys - just change the COMID link against your Patient
 
if i used the open args how am i getting open form patients Details main from the patients list main to open for the specified patient and also open the same said form as a new form.

I am not that great at access programming
 
Then you dont need COMID in these tables - only in PatientID

Company is linked to patient
Patient is linked to everything else

There is no need to try and hold the COMID in every table - your relationships have done this anyway

Make sense?


I just keep it in their so that i can ensure the relationships are present and not lost during development
 
I will hide the comid's after i just using it for development purposes
 
so any suggestions on how to open the patient details main form from the patient list main ensuring you goto specified patient
 

Users who are viewing this thread

Back
Top Bottom