Relationship

dr223

Registered User.
Local time
Yesterday, 16:08
Joined
Nov 15, 2007
Messages
219
Hi,

How can you create a relationship between two forms, so that when the main form displays a record, details of the same student_id can be viewed in the second form.

any sample databases will be appreciated.
 
Use the primary key on the first form as a criteria in the second forms underlying query...


???
 
Thanks,

What do u mean as underlying query in the next form.

My first form its primary key is Numhus

and I have the same field on the second form, however, it is only in the table of the second form because of the relationship to exist, right!!!

Should I also make Numhus primary key in the second form?

The data to be brought forward could be described in the query, is what am doing correct.


Thanks ken
 
Ken,

please review the database attached. What I want to do is that when a record of a student is brought forward, and a user clicks the Qualification History it brings forward the second form and the qualifications based on the Student_ID. The Primary key for the inter-link is the Student_ID.

Thanks alot ken
 

Attachments

Thank you very much Ken.

It works perfectly....
 
Sorry Ken,

When I entered a new student details and went to the Qualification history and entered details when I click save it says
"Index or primary key cannot contain a Null Value"

Secondly, why does it jump to institution rather than qual_type1.... This is a problem I also face in the lower section of the stud_details form. It is not handy to use the tab key to move through the fields...

Thanks Ken
 
Before you open the second form you'll need to save the data in the first. The In the second form you can set the default value of the Student_ID to the what ever it is in the first form...

I think you can set the tab order to fix the second problem...
 
Ok, I have entered data on the first form, but still it does not happen. The way round it is go to the respective table i.e., qual_hist and enter the Student_ID in the table. This works perfectly.

However, for example a user is entering a new record of a student. He populates all the stud_details form and expects to go to the Qualification History section and fill the fields. Rather than going to the table to enter the Student_ID. It is somehow inefficient if it will be the process....

Is there a way round it.

Thanks
 

Users who are viewing this thread

Back
Top Bottom