Get data display in subform whn recordset main frm change tbl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to change the recordset in a form to a record in a different table,
but when I do, the subform won't re-connect. It won't display data and won't
let me enter data. Somewhere in there the subform is trying to make a
connection to the old table. How do I get it to switch to the new table?
 
You have a main form bound to (say) Table1, with a subform showing the
related records from Table2. And when you change the RecordSource property
of the subform to Table3, it shows all records from Table3, not just the
ones that are related to Table1?

If that's the issue, after you set the RecordSource, you need to set the
LinkMasterFields and LinkChildFields properties of the subform control. When
the RecordSource (or SourceObject) changes, Access has a guess at what
LinkMasterFields/LinkChildFields should be, and its guesses are not always
right.
 
Hi Jenni,

Did you check to make sure the subform is linked to the correct table? Make
note of your new table name exactly as you named it. Open your form
containing the subform and click once on the subform to highlight it. Then
click on the top left corner of subform and click on properties. Check the
Record Source of properties to make sure this name matches the one you noted.
If not, then updated it. This should fix your problem. Let me know. Post
your comments.
 

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

Similar Threads


Back
Top