subforms fills pull down control on main form

M

mike

I have a form, which asks the user to enter a beginning
date and ending date to search for available classes. A
query (QueryClassesByDate) is performed based on criteria
that the "ClassDate" falls between the beginning and
ending dates... and that the number of enrolled people
(based on "StudentID") is less than the "ClassSizeLimit".
I have basically two tables, one with the class
information and another one with student enrollment
information.

Getting closer to my question... Next, a form
(FormClassRegistration) that contains a subform
(SubformClassRegistrationDates) is opened from the above
date selection. The main form allows users to enroll into
a class through a couple of text box controls where they
enter their ID, Name, and select a "ClassID" number from a
pull down control. The subform's record source is
the result of the above query (QueryClassesByDate), which
pulls class information from a table
(tableClassRegistration). The subform has a couple
of text boxes that fills in data from the query including:
ClassID, ClassTitle, ClassDate, ClassTime, and
ClassLocation.

My question is: How do I get the combo box/pull down
control on the main form to list the "ClassID" numbers
that are in the subform? I have tried using the combo
box/pull down control's "row source/row source type", but
am having no luck...

ex. In the properties Row Source line I have tried:

SELECT
Forms.formClassRegistration.SubformClassRegistrationDates.C
lassID FROM SubformClassRegistrationDates

I am not sure what I need to do to make this work. I have
made sure I have the spelling correct. Would I use a
callback function? Any help would be appreciated.
 

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