Problem with Link Child and Master Fields

G

Guest

Hi all,

I have a problem with Link Child and Master Fields. I have a form with an
unbound field which links to a subform within that form via Master and Child.
The link fields are Student ID and Student No between Unbound field and
subform.

The problem that I am having is both Student ID and Student No fields are
showing the same client, regardless of what I change in the Unbound field.
Unbound field has 3 columns: Studnet ID, Student No and Student Name. The
Student Name is a display field and Student ID is a bound column.

Please help.

Thanks.
 
G

Guest

Hi all,

I meant to say "The problem that I am having is both Student ID and Student
No fields are showing the same client in the subform, regardless of what I
change in the Unbound field.

Thanks again.
 
G

Guest

Hello all,

I have figured out the problems that I had with the link child and master
fields. There is one more things that related to the previous problem.

Now if I select something from the Unbound Combo box, I get a correct
Student ID in the subform. However, I get nothing in the Student No field in
the subform. I did link the child and master for both Student ID and Student
No in the subform. For some reason, Student ID works, and nothing shows up
for the Student No when I select a Student Name from the Unbound Combo box.

Please help. Thanks.
 
J

John W. Vinson

For some reason, Student ID works, and nothing shows up
for the Student No when I select a Student Name from the Unbound Combo box.

Ummmm...

Why should it?

A Master/Child link field will display an *existing* record, if there's one
for that student ID.

It will not create a new one, nor will it fill in other fields, if there
isn't.

Why does your student table have (apparently) redundant StudentID and
StudentNo fields anyway? From the names, these appear to be two different
candidates for primary key. Did you fall form Microsoft's incorrect
implication that every primary key should be an Autonumber? If the StudentNo
is unique, stable and reasonably short, it could be the primary key all by
itself.

John W. Vinson [MVP]
 
G

Guest

Good morning John,

Thanks for your response. The Student ID field is an autonumber field, and
the Student No field is a number we assign to each student. You are right it
seems redundant, and this is why.

We use a can program to store our student information. The can program uses
these two fields. I am building an Access database (for other reasons) using
the student table from the can program. I guess I can only use the Student
No field, instead of bringing in the Student ID, in my Access database.

Any suggestions are welcome! Thanks.
 
J

John W. Vinson

Thanks for your response. The Student ID field is an autonumber field, and
the Student No field is a number we assign to each student. You are right it
seems redundant, and this is why.

We use a can program to store our student information. The can program uses
these two fields. I am building an Access database (for other reasons) using
the student table from the can program. I guess I can only use the Student
No field, instead of bringing in the Student ID, in my Access database.

If the StudentNo field uniquely and stably identifies a student, and if the
StudentID field does not exist in your canned program, then I'd really suggest
that you use StudentNo as your primary key.

If it does use both - where is the autonumbering done? in Access or in the
canned program? Only one of the programs can control the value of the
autonumber!

John W. Vinson [MVP]
 
G

Guest

Hi John,

The autonumbering is done at the canned program. What I did was I create a
table for Students and append and update the students into the Students table
in Access.

Thanks.
 
J

John W. Vinson

Hi all,

I have a problem with Link Child and Master Fields. I have a form with an
unbound field which links to a subform within that form via Master and Child.
The link fields are Student ID and Student No between Unbound field and
subform.

The problem that I am having is both Student ID and Student No fields are
showing the same client, regardless of what I change in the Unbound field.
Unbound field has 3 columns: Studnet ID, Student No and Student Name. The
Student Name is a display field and Student ID is a bound column.

Please post the following:

the mainform's Recordsource (the SQL of the query if there is one, or the
relevant fieldnames of the table if not)
The same for the Subform
The actual text of the Master and Child Link Fields
The names of the relevant form controls (there's no such thing as an "unbound
field", I presume you have a Textbox or some other control)

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top