Master/Child Link problem in Subform

115 pts.
Tags:
Microsoft Access
Microsoft Access subforms
Hi, I needed to add a new table to my database, so I added it and created a one-to-many relationship with the parent table. I then created a form and used the subform wizard to make it into a subform. The Master and Child links are the primary key in the parent table and the foreign key in the child table. I have three other forms, and did this exact same process with no issues whatsoever. This time, the foreign key is not populating in the child table. Not only that, but whatever information I put into a field child table bleeds across to all the records, even if they're entirely different people. For example, I went to Person A in the parent form, opened up the child form and entered a date. Then I went to a different person in the parent form and opened up the child form and the date field(which should have been blank for Person B) had the same date I entered for person A. I don't know what could be wrong. I followed the exact process as I have before with no variation, and the other times it worked beautifully. This time it's not working at all. I've spent hours trying to troubleshoot this and it's making me crazy. Could someone please advise me? Thanks!
ASKED: October 8, 2009  11:46 PM
UPDATED: October 9, 2009  3:21 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I just figured out the answer. I coded the command button to open the subform/child, instead of just making it visible. This bypassed the main form/parent and caused the problem. When I set the subform as invisible and made it visible when the command button was clicked, the foreign key was there. That way the subform would tied to the proper person in the main form.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following