Subform Form select record

P

Phil

I have a Form Attendees which has a subform Calender, the calender was
originally a form on its own and i had to select the AttendeeID (primarykey
for Attendees) manually, i am new to access but have added the calender to
the attendees form to allow easy access to the attendance records how do i
get the subform to automatically select the correct AttendeeID for the record
shown in the main form.

i originally tried to do it with setting the record source to

SELECT [Attendees].[AttendeeID] FROM Attendees WHERE
((([Attendees].[AttendeeID])=[Forms]!Attendee!AttendeeID));

this just gives me a drop down list of all attendeesID's but does not select
the one in the main form.
 
D

Dennis

When you add a subform to a main form, the wizard should ask which fields
link the sub form to the main form so that the records automatically change
on the sub form as the main form record changes. In design view select the
sub form and then show the properties, fill in the master and child link
fields that link the forms.
 
P

Phil

Thanks alot worked great, i was not given the choice by the wizard when i
first did it, but i was able to define master/child field manually.

thanks

Phil

Dennis said:
When you add a subform to a main form, the wizard should ask which fields
link the sub form to the main form so that the records automatically change
on the sub form as the main form record changes. In design view select the
sub form and then show the properties, fill in the master and child link
fields that link the forms.

Phil said:
I have a Form Attendees which has a subform Calender, the calender was
originally a form on its own and i had to select the AttendeeID (primarykey
for Attendees) manually, i am new to access but have added the calender to
the attendees form to allow easy access to the attendance records how do i
get the subform to automatically select the correct AttendeeID for the record
shown in the main form.

i originally tried to do it with setting the record source to

SELECT [Attendees].[AttendeeID] FROM Attendees WHERE
((([Attendees].[AttendeeID])=[Forms]!Attendee!AttendeeID));

this just gives me a drop down list of all attendeesID's but does not select
the one in the main form.
 
Top