Limit Combo Box

D

dee

Hi,

I have three tables:

Family
Students
Meetings

FamilyID PK is FK in Meetings
FamilyID PK is also FK in the Students table (for other uses)

I am having problems in the Meetings sub-form. I want it to allow me to
choose up to four children in the same family who are students and who
attended the family meeting.

When I create a combo box, it shows ALL student names, not just the ones for
the currently displayed family.

The fields I need in the sub form should look something like this:
Meeting Date Parent 1 Parent 2 Student1 Student2 Student3 Student 4

where the student 1 through 4 are drop-downs.

Thanks!
 
K

Ken Snell [MVP]

What query are you using as the Row Source for the second combo box (the one
that displays student names)?
 
D

dee

Hi again,

I obviously am totally confused with how this works. My query includes:

FamilyName and FamilyID from Family table

DateOfMeeting, Parent1, Parent2, Student1, Student2, Student3, Student4,
Notes from Meeting table

I created a main form that includes the FamilyName and FamilyID
I created a sub form that includes the rest of the fields

I thought I had to then create a new combo box for each student 1 - 4 and
select StudentFirstName from the Student table, which isn't in the query,
indicating the Student1 field, for example, as where I want to put the data.

When I click the drop-down, it displays all student names; not just those of
the displayed family.

I hope I have explained this well enough. Any assistance would be so
wonderful. I've been at this for days.

--
Thanks!

Dee


Ken Snell said:
What query are you using as the Row Source for the second combo box (the one
that displays student names)?
 
L

Larry Daugherty

In the query for your combobox on the subform, in the criteria line
for FamilyID, refer back to me1FamilyID control on the main form
(it's OK if the control on the form is invisible). The subform
comboboxes should now show just family members.

HTH
--
-Larry-
--

dee said:
Hi again,

I obviously am totally confused with how this works. My query includes:

FamilyName and FamilyID from Family table

DateOfMeeting, Parent1, Parent2, Student1, Student2, Student3, Student4,
Notes from Meeting table

I created a main form that includes the FamilyName and FamilyID
I created a sub form that includes the rest of the fields

I thought I had to then create a new combo box for each student 1 - 4 and
select StudentFirstName from the Student table, which isn't in the query,
indicating the Student1 field, for example, as where I want to put the data.

When I click the drop-down, it displays all student names; not just those of
the displayed family.

I hope I have explained this well enough. Any assistance would be so
wonderful. I've been at this for days.

--
Thanks!

Dee
 
D

dee

Hi Larry and thanks for your help. I'm afraid I'm either blonde or exhausted
(been getting next to no sleep working on this!), but I can't understand what
you posted, even after re-reading it about a dozen times and trying a few
things.

Could you be more specific? I'm very new to this. Do you mean to modify my
actual query, or to insert a control in my form.

Thanks for your patience.
--
Thanks!

Dee
 
L

Larry Daugherty

Hi Dee,

My daughter gives me the blonde routine when even simple things go
wrong for her.

You're probably over-thinking this thing if you've been at it for a
while. It's also possible that you don't yet understand relational
databases. I can't be more specific until I know exactly what you're
doing - From what your application is intended to do down to table
and field names through forms and subforms and their control names as
you try to do it

If you're getting too tired and frustrated to think then you might
just decode my email address and send me a copy of your application.
I'll have a look and create what I think is the solution you're
seeking and send it back to you. If you're really trusting, include
your phone #s, time zone, and hours to call. I'll include mine in
return but not here in the ng.

I'm guessing that there may need to be a re-organization of your
tables. If so, I'll do it when I receive your app but will need to be
able to talk to you so that I get the design right.

I'll add a comment to this thread so that anyone with an interest who
is lurking can get it unless the re-organization is complex.

HTH
 
D

dee

Hi Larry,

Have just sent a message to you via regular e-mail and if it doesn't bounce
back, will send you the file.

I am so thankful... this is giving me gray hair!
 

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