Sub Form basics 101

  • Thread starter Thread starter D. Shane Fowlkes
  • Start date Start date
D

D. Shane Fowlkes

It's been a very long time since I used Access. I currently have a form
with a sub form embedded. The primary form is simply a contacts form that
has basic information such as name, address, city, etc. I also have a
Events table that will store "Events" that each contact may or may not be
invited to attend such as fund raisers, public speakers, etc. The Events
will be controlled by another form (not discussed here). I have a "matrix"
table that will store the ContactID and the EventID and a "ResponseID" (Yes,
No, No Response) in which the table record the response from the contact for
any given event. It's simpler than it sounds.

However, I cannot seem to get the subForm to "connect" to the current
ContactID in the current parent form. I hope this makes sense. A sample is
at http://www.drpt.state.va.us/contacts.mdb

Try to select an Event and a response in the sub form and you'll see what I
mean. Thanks a million!
 
D. Shane Fowlkes said:
It's been a very long time since I used Access. I currently have a
form with a sub form embedded. The primary form is simply a contacts
form that has basic information such as name, address, city, etc. I
also have a Events table that will store "Events" that each contact
may or may not be invited to attend such as fund raisers, public
speakers, etc. The Events will be controlled by another form (not
discussed here). I have a "matrix" table that will store the
ContactID and the EventID and a "ResponseID" (Yes, No, No Response)
in which the table record the response from the contact for any given
event. It's simpler than it sounds.

However, I cannot seem to get the subForm to "connect" to the current
ContactID in the current parent form. I hope this makes sense. A
sample is at http://www.drpt.state.va.us/contacts.mdb

Try to select an Event and a response in the sub form and you'll see
what I mean. Thanks a million!

You haven't set the LinkMasterFields and LinkChildFields of the subform
control. If you set the former to ID and the latter to ContactID, the
subform will work. Well, you'll also have to remove the duplicate event
procedure named "buttonNext_Click" from the code module for the main
form -- an unrelated error that probably hasn't bitten you until now --
but *then* the subform will work.
 
Thanks!

--



Dirk Goldgar said:
You haven't set the LinkMasterFields and LinkChildFields of the subform
control. If you set the former to ID and the latter to ContactID, the
subform will work. Well, you'll also have to remove the duplicate event
procedure named "buttonNext_Click" from the code module for the main
form -- an unrelated error that probably hasn't bitten you until now --
but *then* the subform will work.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top