Subform Form select record

G

Guest

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.
 
G

Guest

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.
 
G

Guest

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.
 

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